+
Skip to content

Bug Report: Incorrect error status code handling (4xx, 5xx) #112

@vishalpolley-1mg

Description

@vishalpolley-1mg

Description

4xx and 5xx status codes are not properly handled at the Catalyst level.

Issue

Current handling of error status codes seems incorrect.

let status = matches.length && matches[0].match.path === "*" ? 404 : 200

This does not account for actual error codes being passed.

Proposed Solution

Ensure proper use of the errorCode prop for handling status codes:

let status = errorCode || (matches.length && matches[0].match.path === "*" ? 404 : 200)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载