Skip to content

custom error messages from errors.json#657

Open
muazzam0x48 wants to merge 1 commit intomainfrom
custom-error-messages
Open

custom error messages from errors.json#657
muazzam0x48 wants to merge 1 commit intomainfrom
custom-error-messages

Conversation

@muazzam0x48
Copy link
Copy Markdown
Contributor

It lets the user define custom error messages universally across the application or for specific entities.

Example:

config.al

{
    "service": {
      "port": 8080
    },
    "customErrorMessages": {"enabled": true},
}

errors.json

{
    "AL_COGNITO_TOKEN_VERIFY_FAILED": "Cognito auth failed.",
    "Resource/Resource": {
      "AL_DB_UNIQUE_VIOLATION": "Resource with this email already exists. Error code: {{code}}. Message {{message}}"
    }
}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant