Skip to content

EjrApiResponseError: improve error message #418

Open

Description

@bossie

Context: I forgot to add a field to the EJR API so batch jobs broke; in particular, starting a batch job made OpenEO return this 500 error in response to a 400 from the EJR API:

openeo.rest.OpenEoApiError: [500] Internal: Server error: EjrApiResponseError('Error communicating with batch job system, consider trying again. Details: 400 'Bad Request' on PATCH \'https://jobregistry.vgt.vito.be/jobs/j-2507162224414dd5ae34b7bee23d713a\': {"statusCode":400,"message":["property results_metadata_uri should not exist"],"error":"Bad Request"}') (ref: r-250716222441465198d52a399903d41c)

The error message suggests to try again but this is obviously not going to work in this case. A better approach could be to adapt this response message (and status code) to the one that we get back from the EJR API.

Activity

  1. soxofaan commented on Jul 25, 2025

    @soxofaan
    Member

    A better approach could be to adapt this response message (and status code) to the one that we get back from the EJR API.

    I'm not sure about that: the EJR is an implementation aspect of the openEO backend. It is not a concern to expose the end-user to.
    I think it's perfectly right that the 400 error from the EJR request is exposed as a 500 to the end user. In this case, it's the openEO backend that made a "client error", but that's internal business, so it should be propagated to the end-user as "500 Internal". There is nothing the end user can do to fix anything, so they should not get a 4xx response

    Regardless of the status code, there is of course still room to improve the message itself

  2. bossie commented on Aug 4, 2025

    @bossie
    CollaboratorAuthor

    Sure: adapt, not just propagate.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions