Skip to content

Improve Error Messaging for Error Responses #5970

Open

Description

@nicopace

Currently, KoboToolbox responds with a generic HTTP 500 Internal Server Error in several scenarios, including but not limited to:

  • When required information is missing or malformed in the request
  • When a file size limit is exceeded
  • When there is any kind of conflict during submission or processing

In all these cases, the 500 error is returned without a descriptive message indicating the cause of the error.

Why this matters:

This behavior makes it difficult for users and developers to understand what went wrong and how to correct it. It also hinders the ability to provide accurate bug reports or support requests, as there is no visibility into the underlying issue.

Suggested improvement:

For every 500 error (and ideally for all 4xx and 5xx errors), KoboToolbox should return a descriptive error message in the response body. This message should clearly indicate the reason for the failure, such as:

  • "File size exceeds the allowed limit of X MB."
  • "Missing required parameter: submission.xml."
  • "Conflict: Submission with this ID already exists."

Expected benefits:

  • Improves user experience and reduces frustration
  • Helps users and developers correct submission issues more efficiently
  • Leads to more useful and specific bug reports, improving the development feedback loop
  • Aligns with best practices for API error handling

We hope this can be prioritized as part of ongoing usability and developer experience improvements.

Activity

  1. changed the title [-]Improve Error Messaging for HTTP 500 Responses[/-] [+]Improve Error Messaging for Error Responses[/+] on Jul 22, 2025
  2. nicopace commented on Jul 22, 2025

    @nicopace
    Author

    The same issue occurs when submitting via the API. If there's a problem with the submission, the response is an HTML error page instead of a structured error message, which makes debugging more difficult.

  3. noliveleger commented on Aug 5, 2025

    @noliveleger
    Contributor

    Validation errors are returned in XML. Can you describe how you test it? For example, when I test conflicting submissions, I do receive an XML.
    500 errors are a different story.

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

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