Skip to content

Error Handling: Multiple server.log errors indicating http 406 Not Acceptable #7134

@kcondon

Description

@kcondon

Seeing this in the logs, without tying it to a specific user action, though I am testing the download all api:

[2020-07-22T08:52:30.214+0000] [Payara 5.201] [SEVERE] [] [edu.harvard.iq.dataverse.api.errorhandlers.ThrowableHandler] [tid: _ThreadID=92 _ThreadName=http-thread-pool::jk-connector(5)] [timeMillis: 1595407950214] [levelValue: 1000] [[
Uncaught REST API exception:
Incident: 39be6b43-cbbf-4dc9-a19a-484f413872a3
URL: https://dataverse-internal.iq.harvard.edu/api/v1/datasets/export?exporter=dcterms&persistentId=doi%3A10.70122%2FFK2%2FEVQ2OH
Method: GET
javax.ws.rs.NotAcceptableException: HTTP 406 Not Acceptable

@qqmyers Has made the following comments:
ThrowableHandler was added prior to #7085. When it was added, it stopped the default handing for exceptions such as javax.ws.rs.NotAcceptableException . What #7085 did was to add more exception/http code-specific handlers to manage the ones Dataverse source throws so that they don't get caught be the new default ThrowableHandler. My guess is that javax.ws.rs.NotAcceptableException is being thrown by the framework code rather than Dataverse source code, so I didn't add a specific handler for it. The fix is probably to just add yet-another handler for this specific exception and just send a 406 response as intended. The Redirect handler is probably a good example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions