Skip to content

"POST /terms" error message when "legacyId" in not unique #22

@maxceem

Description

@maxceem

At the moment if we try to create a new "TermsOfUse" record and send legacyId which is already in use, server would return error with status 500:

{
    "message": "Internal server error"
}

It's hard to understand what is wrong with request from this error message.

It would be better to return some particular error message with status 400, like:

{
    "message": "TermsOfUse with such 'legacyId' already exists. It should be unique."
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions