Skip to content

Commit fc58c33

Browse files
committed
updated error reporting page
Signed-off-by: bidi <bidi@apidemia.com>
1 parent b56c748 commit fc58c33

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

docs/book/v5/core-features/error-reporting.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The error reporting endpoint was designed to allows the **frontend developers** of your API to report any bugs they encounter in a secure way that is fully under your control.
44

5-
### Example case usage
5+
## Example case usage
66

77
- Frontend developed in Angular.
88
- Frontend developer will use try-catch in the code in order to send **frontend errors** back to the API
@@ -47,18 +47,18 @@ Behind the scenes, the API validates your configuration and lets you know if any
4747
Below are the requirements for an application to be able to send error messages to Dotkernel API.
4848

4949
- **Server-side requirements** stored in in `config/autoload/error-handling.global.php`; note these can be set/overwritten in `config/autoload/local.php`:
50-
- All keys (`enabled`, `path`, `tokens`, `domain_whitelist` and `ip_whitelist`) must exist under `ErrorReportServiceInterface::class`.
51-
- The error reporting feature must be enabled via `ErrorReportServiceInterface::class` . `enabled` => `true`.
52-
- `ErrorReportServiceInterface::class` . `path` must have a value; if the destination file does not exist, it will be created automatically.
53-
- `ErrorReportServiceInterface::class` . `tokens` must contain at least one token.
54-
- At least one of `ErrorReportServiceInterface::class` . `domain_whitelist`/`ip_whitelist` must have at least one value.
50+
- All keys (`enabled`, `path`, `tokens`, `domain_whitelist` and `ip_whitelist`) must exist under `ErrorReportServiceInterface::class`.
51+
- The error reporting feature must be enabled via `ErrorReportServiceInterface::class` . `enabled` => `true`.
52+
- `ErrorReportServiceInterface::class` . `path` must have a value; if the destination file does not exist, it will be created automatically.
53+
- `ErrorReportServiceInterface::class` . `tokens` must contain at least one token.
54+
- At least one of `ErrorReportServiceInterface::class` . `domain_whitelist`/`ip_whitelist` must have at least one value.
5555

5656
**Note:** The function `checkRequest()` tries to validate the request by checking matches for `domain_whitelist` with `isMatchingDomain()` and for `ip_whitelist` with `isMatchingIpAddress()`.
5757
If both return `false`, a `ForbiddenException` is thrown and the error message does not get stored.
5858

5959
- **Application-side requirements**:
60-
- Send the `Error-Reporting-Token` header with a valid token previously stored in `config/autoload/error-handling.global.php` in the `ErrorReportServiceInterface::class` . `tokens` array.
61-
- Send the `Origin` header set to the application's URL; this is the application that send the report.
60+
- Send the `Error-Reporting-Token` header with a valid token previously stored in `config/autoload/error-handling.global.php` in the `ErrorReportServiceInterface::class` . `tokens` array.
61+
- Send the `Origin` header set to the application's URL; this is the application that send the report.
6262

6363
**Note:**
6464

0 commit comments

Comments
 (0)