Skip to content

when sending an empty array to an endpoint the returned error is not clear #519

@criskell

Description

@criskell

When POSTing to an endpoint having the payload as an empty array, the error property of the response contains an error that is not clear where the caller went wrong, it just sends what looks like an error from some internal library.

Example request

curl -X POST 'https://api.openpix.com.br/api/v1/charge' --header "Authorization: $APP_ID" --header 'Content-Type: application/json' --data-raw '[]' && echo

image

Example request with a clear error

curl -X POST 'https://api.openpix.com.br/api/v1/charge' --header "Authorization: $APP_ID" --header 'Content-Type: application/json' --data-raw '{"value": 100}' && echo

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions