Skip to content

fix http requests not properly setting the status code - #231

Closed
Absolucy wants to merge 1 commit into
tgstation:masterfrom
Absolucy:reqfix
Closed

fix http requests not properly setting the status code#231
Absolucy wants to merge 1 commit into
tgstation:masterfrom
Absolucy:reqfix

Conversation

@Absolucy

@Absolucy Absolucy commented Jul 6, 2025

Copy link
Copy Markdown
Member

image

the reqwest -> ureq port had a slight whoopsie, non-2xx status code would always error (not setting the status_code) field due to how ureq worked, as a non-2xx status code would return an Err(ureq::Error::Status(status_code, response)) instead of an Ok(response)

this fixes that, so that non-2xx status codes will still return the body and such, including setting the status code.

@ZeWaka

ZeWaka commented Jul 6, 2025

Copy link
Copy Markdown
Collaborator

#205

@ZeWaka

ZeWaka commented Jul 6, 2025

Copy link
Copy Markdown
Collaborator

The port preserved behavior, this is how it has always worked

@ZeWaka ZeWaka 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.

This is also not the way to solve it, it's a flag on the http client or something

@optimumtact

Copy link
Copy Markdown
Member

http_real_error_request

@Absolucy Absolucy closed this Jul 7, 2025
@Absolucy
Absolucy deleted the reqfix branch July 7, 2025 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants