Skip to content

AnnounceHTTPResponseHandler should provide more detail #616

Closed

Description

@Southclaws

The log should at least add the status but open.mp's API also provides additional information about the failure sometimes: https://github.com/openmultiplayer/web/blob/master/internal/web/web.go#L11-L20

So, the ideal handling code can check for a non-200 status code and parse the body and pull out the error string and log that.

There are only two possible kinds of failure: querying and storing (https://github.com/openmultiplayer/web/blob/master/app/transports/api/legacy/h_postLegacy.go#L27-L39) which is either a 400 bad request or a 500 internal server error.

Activity

  1. self-assigned this
    on Jun 12, 2023
  2. added
    enhancement
    on Jun 12, 2023
  3. AmyrAhmady commented on Jun 15, 2023

    @AmyrAhmady
    Member

    First off, open.mp was not printing the error message, so that's one in #676
    Also all HTTP calls were doomed to not read the response at the right time when you received a response, so I increased read timeout value up to 60 seconds, now it automatically fixes AnnounceHTTPResponseHandler as well, since now we got an actual response to use/show.

    Anyway, fixed in next build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions