Skip to content

Error stack trace becomes visible when using the XML accept header #2660

Closed

Description

@easbar

Depending on the accept header we use with the /route endpoint we can see the error stack trace on the client side:

  • Using 'Accept: application/xml' we get to see the error stack trace as XML. For example Firefox and Chrome seem to do this by default, so we see this when we open a /route url in the browser.
  • Using 'Accept: application/json' or no accept header at all we get to see the error message as JSON

Not sure if this is a real problem and I just put this as a reminder here. For users who do not use GraphHopper behind a proxy it might be important, but probably this can simply be disabled by some DropWizard configuration parameter in config.yml(?).

Activity

  1. easbar commented on Sep 23, 2022

    @easbar
    MemberAuthor

    Btw we have a similar problem for /mvt (MVTResource.java). If an exception is thrown there apparently we also try to serialize it to XML (somewhere), but since the endpoint is annotated with @Produces("application/x-protobuf") we get a server-side error (500).

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