Skip to content

Internet API Throws Exception for HTTP Error Response (again) #3663

@kodai2199

Description

@kodai2199

I'm trying to use a REST API I built, but I cannot handle HTTP error codes in-game, because attempting to iterate over the request handle throws the following error: Server returned HTTP response code: 400 for URL: ..., and getmetatable(handle).__index.response() simply returns nil so I am unable to check for certain response codes there either.

I believe this issue was said to be fixed here #3398. However, in the latest version, this bug is still here. I am tempted to look at the differences between the relevant files in the latest release and in the older ones to see what's going on.

I am now using https://http.codes/ for testing purposes, and I can confirm that I can correctly get codes for responses like 200 OK. But with 400, 404, ... I only get nil, and an error if I try to read the response.
Thank you in advance for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOC feature is broken

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions