Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearer error for specific cases #1249

Open
gasserluc opened this issue Oct 18, 2024 · 1 comment
Open

Clearer error for specific cases #1249

gasserluc opened this issue Oct 18, 2024 · 1 comment
Assignees
Labels
common Relates to common behaviors feature New feature or request

Comments

@gasserluc
Copy link
Member

gasserluc commented Oct 18, 2024

Would it be possible to add clearer error in certain specific cases, for instance : when you try to POST an entitiy without [] to a batch endpoint (such as /entityOperations/create), stellio gives the following error :

{
    "type": "https://uri.etsi.org/ngsi-ld/errors/InvalidRequest",
    "title": "The request associated to the operation is syntactically invalid or includes wrong content",
    "status": 400,
    "detail": "Cannot deserialize value of type `java.util.ArrayList<java.util.Map<java.lang.Object,java.lang.Object>>` from Object value (token `JsonToken.START_OBJECT`)\n at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]",
    "instance": "/ngsi-ld/v1/entityOperations/create"
}

Which is not really explicit on this simple mistake

Is it possible tp add specific error details in such specific cases (for example: detail: "Payload sent to a batch endpoint must be an Array" or something like that) ? This is a small mistake and such details would be useful.

@bobeal bobeal added feature New feature or request common Relates to common behaviors labels Oct 23, 2024
@bobeal
Copy link
Member

bobeal commented Oct 23, 2024

Proposal:

  • Add an API troubleshot section on Stellio RTD with a list of common errors (messages) and a short explanation of what is the reason of the error and how to fix it
  • Remove what is now in the title member (same as type) and move the details content to title
  • Use the now free details member to add a link to the API troubleshot section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Relates to common behaviors feature New feature or request
Projects
Status: Short term
Development

No branches or pull requests

3 participants