Skip to content

Improve reqwest usage & errors - #68

Merged
ktwrd merged 1 commit into
developfrom
feature/improve-reqwest-and-errors
Jul 28, 2026
Merged

Improve reqwest usage & errors#68
ktwrd merged 1 commit into
developfrom
feature/improve-reqwest-and-errors

Conversation

@ktwrd

@ktwrd ktwrd commented May 9, 2026

Copy link
Copy Markdown
Owner

This PR improves the usage of reqwest when fetching versions.json so it actually sends the user agent defined in src/lib.rs. This PR also improves some of the data stored in errors, so if there's a BeansError::SerdeJson thrown/returned, then it'll include the content it was trying to deserialise. The error Reqwest also now includes an error message field, so more information can be described when returning that error.

Along with this, the user agent has been updated to include the sourcemod name, so the user agent for Open Fortress would be beans-rs/1.7.3 (open_fortress).

@ktwrd ktwrd added the enhancement New feature or request label May 9, 2026
@ktwrd
ktwrd requested a review from sour-dani July 27, 2026 04:45

@sour-dani sour-dani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Will be nice to see more verbose reqwest error messages

@ktwrd
ktwrd merged commit a8fbff0 into develop Jul 28, 2026
4 checks passed
@ktwrd
ktwrd deleted the feature/improve-reqwest-and-errors branch July 28, 2026 01:20
@ktwrd ktwrd mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants