Skip to content

Commit e75c656

Browse files
authored
docs(errors): document the different behaviour depending on status code (#1359)
1 parent d72bbaa commit e75c656

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/errors.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,10 @@ the error will be returned in this format as well:
101101
"hydra:description": "The product \"1234\" does not exist."
102102
}
103103
```
104+
105+
## Message Scope
106+
107+
Depending on the status code you use, the message may be replaced with a generic one in production to avoid leaking unwanted information.
108+
If your status code is >= 500 and < 600, the exception message will only be displayed in debug mode (dev and test). In production, a generic message matching the status code provided will be shown instead. If you are using an unofficial HTTP code, a general message will be displayed.
109+
110+
In any other cases, your exception message will be sent to end users.

0 commit comments

Comments
 (0)