Skip to content

Update API error format on Attester #2241

Description

@DenBond7

ref #2171 (comment)

FES

{
  "code": 401,
  "message": "Authorization credentials required",
  "details": "io.javalin.http.UnauthorizedResponse"
}

Attester

{
    "error": {
        "message": "Body should not be empty"
    }
}

PubLookup

{
  "code": 404,
  "message": "Not Found",
  "details": ""
}

EKM

{
  "code": 401,
  "message": "Authorization credentials required",
  "details": "io.javalin.http.UnauthorizedResponse: Authorization credentials required"
}

Backend

{
    "error": {
        "code": 400,
        "message": "Wrong request received",
        "internal": "Please add a json body"
    }
}

@tomholub Is it possible to have the same error format for all APIs? it will help to simplify code.

It would be nice to have
(I prefer this one)

{
    "error": {
        "_": ""
        "_": "",
        ...
    }
}

or

{
  "_": "",
  "_": ""
}

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions