Skip to content

Detect 503 status code if rejected by CORS #426

Description

@NeXTs

Is it possible to detect response status code if request was rejected by CORS?

Let's say for testing purposes my server side which is located on different domain is hardcoded to return 503 status code. Because of that - all requests rejects and catched by .catch(error => {}) but error argument is just rejecting message (TypeError: Failed to fetch), it does not contain status code and I can not find a way to detect it.

Is it possible at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions