@rexezuge/errors 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,23 +31,23 @@ try {
|
|
|
31
31
|
|
|
32
32
|
One class per row of `CATALOG`, so a status can never disagree with its code or default message:
|
|
33
33
|
|
|
34
|
-
| Class
|
|
35
|
-
|
|
|
36
|
-
| `BadRequestError`
|
|
37
|
-
| `UnauthorizedError`
|
|
38
|
-
| `ForbiddenError`
|
|
39
|
-
| `NotFoundError`
|
|
40
|
-
| `MethodNotAllowedError`
|
|
41
|
-
| `ConflictError`
|
|
42
|
-
| `PreconditionFailedError`
|
|
43
|
-
| `PayloadTooLargeError`
|
|
44
|
-
| `UnsupportedMediaTypeError` | 415
|
|
45
|
-
| `RateLimitedError`
|
|
46
|
-
| `InternalServerError`
|
|
47
|
-
| `NotImplementedError`
|
|
48
|
-
| `BadGatewayError`
|
|
49
|
-
| `ServiceUnavailableError`
|
|
50
|
-
| `DatabaseError`
|
|
34
|
+
| Class | Status | Exposes message |
|
|
35
|
+
| --------------------------- | ------ | --------------- |
|
|
36
|
+
| `BadRequestError` | 400 | yes |
|
|
37
|
+
| `UnauthorizedError` | 401 | yes |
|
|
38
|
+
| `ForbiddenError` | 403 | yes |
|
|
39
|
+
| `NotFoundError` | 404 | yes |
|
|
40
|
+
| `MethodNotAllowedError` | 405 | yes |
|
|
41
|
+
| `ConflictError` | 409 | yes |
|
|
42
|
+
| `PreconditionFailedError` | 412 | yes |
|
|
43
|
+
| `PayloadTooLargeError` | 413 | yes |
|
|
44
|
+
| `UnsupportedMediaTypeError` | 415 | yes |
|
|
45
|
+
| `RateLimitedError` | 429 | yes |
|
|
46
|
+
| `InternalServerError` | 500 | no |
|
|
47
|
+
| `NotImplementedError` | 501 | no |
|
|
48
|
+
| `BadGatewayError` | 502 | no |
|
|
49
|
+
| `ServiceUnavailableError` | 503 | yes |
|
|
50
|
+
| `DatabaseError` | 502 | no |
|
|
51
51
|
|
|
52
52
|
`HttpServiceError` is the generic carrier when only a catalog entry is needed. `DatabaseError` carries the D1 classifier's verdict in its `retryable` flag.
|
|
53
53
|
|