Skip to content

Improve error handling by returning appropriate HTTP status codes #9737

Open
@0xSysR3ll

Description

@0xSysR3ll

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I have searched for plugins that provide already provide the feature

Proposal

Hello,

I don't know if it's already been mentioned or if it's deliberate not to implement it this way but.

Currently, when a file is not found (e.g., a missing template or resource), Roundcube displays an error page with a message such as:

FILE NOT FOUND
The requested resource was not found!
Please contact your server-administrator.

However, the server still responds with an HTTP status code of 200 OK.
This behavior can mislead monitoring systems and end-users, as it does not reflect the actual error condition.

I propose enhancing the error handling logic to return a 404 Not Found HTTP status code for missing files or resources instead of 200 OK.
This adjustment would ensure the response accurately represents the error state.

Motivation and context

Returning a 404 Not Found status for missing files instead of 200 OK would make it easier for monitoring tools to detect and classify errors accurately.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions