Skip to content

Instantly share code, notes, and snippets.

@leikahing
Last active July 14, 2022 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leikahing/829f5f05f3104192830d6a43b6fbac7d to your computer and use it in GitHub Desktop.
Save leikahing/829f5f05f3104192830d6a43b6fbac7d to your computer and use it in GitHub Desktop.
Examples of Gitlab errors

This is one form of the error JSON. The message field is mapped to a String.

{
    "message":"400 (Bad request) \"title\" not given"
}

The error JSON can also take a more general form:

{
    "message": {
        "<property-name>": [
            "<error-message>",
            "<error-message>",
            ...
        ],
        "<embed-entity>": {
            "<property-name>": [
                "<error-message>",
                "<error-message>",
                ...
            ],
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment