Skip to content

Commit f972942

Browse files
committed
Added nearly all http error codes with new format
1 parent f7a77a1 commit f972942

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+483
-49
lines changed

README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,51 @@
77
## 🌐 Available Pages & Demo
88
Here's a list of all available error pages and their demo links:
99

10-
| Error Code | Page Name | Description | Demo Link |
11-
|------------|----------------|------------------------------------------|---------------------------------------------------------------|
12-
| `400` | `401.html` | Bad Request | [Demo 400](https://tobidi0410.github.io/error-pages/http-400.html) |
13-
| `401` | `401.html` | Unauthorized | [Demo 401](https://tobidi0410.github.io/error-pages/http-401.html) |
14-
| `404` | `404.html` | Page Not Found | [Demo 404](https://tobidi0410.github.io/error-pages/http-404.html) |
15-
| `502` | `502.html` | Bad Gateway | [Demo 502](https://tobidi0410.github.io/error-pages/http-502.html) |
10+
| Error Code | Page Name | Description | Demo Link |
11+
| ---------- | ---------- | ------------------------------- | ------------------------------------------------------------------ |
12+
| `400` | `400.html` | Bad Request | [Demo 400](https://tobidi0410.github.io/error-pages/4XX/http-400.html) |
13+
| `401` | `401.html` | Unauthorized | [Demo 401](https://tobidi0410.github.io/error-pages/4XX/http-401.html) |
14+
| `402` | `402.html` | Payment Required | [Demo 402](https://tobidi0410.github.io/error-pages/4XX/http-402.html) |
15+
| `403` | `403.html` | Forbidden | [Demo 403](https://tobidi0410.github.io/error-pages/4XX/http-403.html) |
16+
| `404` | `404.html` | Not Found | [Demo 404](https://tobidi0410.github.io/error-pages/4XX/http-404.html) |
17+
| `405` | `405.html` | Method Not Allowed | [Demo 405](https://tobidi0410.github.io/error-pages/4XX/http-405.html) |
18+
| `406` | `406.html` | Not Acceptable | [Demo 406](https://tobidi0410.github.io/error-pages/4XX/http-406.html) |
19+
| `407` | `407.html` | Proxy Authentication Required | [Demo 407](https://tobidi0410.github.io/error-pages/4XX/http-407.html) |
20+
| `408` | `408.html` | Request Timeout | [Demo 408](https://tobidi0410.github.io/error-pages/4XX/http-408.html) |
21+
| `409` | `409.html` | Conflict | [Demo 409](https://tobidi0410.github.io/error-pages/4XX/http-409.html) |
22+
| `410` | `410.html` | Gone | [Demo 410](https://tobidi0410.github.io/error-pages/4XX/http-410.html) |
23+
| `411` | `411.html` | Length Required | [Demo 411](https://tobidi0410.github.io/error-pages/4XX/http-411.html) |
24+
| `412` | `412.html` | Precondition Failed | [Demo 412](https://tobidi0410.github.io/error-pages/4XX/http-412.html) |
25+
| `413` | `413.html` | Payload Too Large | [Demo 413](https://tobidi0410.github.io/error-pages/4XX/http-413.html) |
26+
| `414` | `414.html` | URI Too Long | [Demo 414](https://tobidi0410.github.io/error-pages/4XX/http-414.html) |
27+
| `415` | `415.html` | Unsupported Media Type | [Demo 415](https://tobidi0410.github.io/error-pages/4XX/http-415.html) |
28+
| `416` | `416.html` | Range Not Satisfiable | [Demo 416](https://tobidi0410.github.io/error-pages/4XX/http-416.html) |
29+
| `417` | `417.html` | Expectation Failed | [Demo 417](https://tobidi0410.github.io/error-pages/4XX/http-417.html) |
30+
| `418` | `418.html` | I'm a teapot | [Demo 418](https://tobidi0410.github.io/error-pages/4XX/http-418.html) |
31+
| `419` | `419.html` | Authentication Timeout | [Demo 419](https://tobidi0410.github.io/error-pages/4XX/http-419.html) |
32+
| `420` | `420.html` | Method Failure | [Demo 420](https://tobidi0410.github.io/error-pages/4XX/http-420.html) |
33+
| `421` | `421.html` | Misdirected Request | [Demo 421](https://tobidi0410.github.io/error-pages/4XX/http-421.html) |
34+
| `422` | `422.html` | Unprocessable Entity | [Demo 422](https://tobidi0410.github.io/error-pages/4XX/http-422.html) |
35+
| `423` | `423.html` | Locked | [Demo 423](https://tobidi0410.github.io/error-pages/4XX/http-423.html) |
36+
| `424` | `424.html` | Failed Dependency | [Demo 424](https://tobidi0410.github.io/error-pages/4XX/http-424.html) |
37+
| `425` | `425.html` | Too Early | [Demo 425](https://tobidi0410.github.io/error-pages/4XX/http-425.html) |
38+
| `426` | `426.html` | Upgrade Required | [Demo 426](https://tobidi0410.github.io/error-pages/4XX/http-426.html) |
39+
| `427` | `427.html` | Unassigned | [Demo 427](https://tobidi0410.github.io/error-pages/4XX/http-427.html) |
40+
| `428` | `428.html` | Precondition Required | [Demo 428](https://tobidi0410.github.io/error-pages/4XX/http-428.html) |
41+
| `429` | `429.html` | Too Many Requests | [Demo 429](https://tobidi0410.github.io/error-pages/4XX/http-429.html) |
42+
| `430` | `430.html` | Unassigned | [Demo 430](https://tobidi0410.github.io/error-pages/4XX/http-430.html) |
43+
| `500` | `500.html` | Internal Server Error | [Demo 500](https://tobidi0410.github.io/error-pages/5XX/http-500.html) |
44+
| `501` | `501.html` | Not Implemented | [Demo 501](https://tobidi0410.github.io/error-pages/5XX/http-501.html) |
45+
| `502` | `502.html` | Bad Gateway | [Demo 502](https://tobidi0410.github.io/error-pages/5XX/http-502.html) |
46+
| `503` | `503.html` | Service Unavailable | [Demo 503](https://tobidi0410.github.io/error-pages/5XX/http-503.html) |
47+
| `504` | `504.html` | Gateway Timeout | [Demo 504](https://tobidi0410.github.io/error-pages/5XX/http-504.html) |
48+
| `505` | `505.html` | HTTP Version Not Supported | [Demo 505](https://tobidi0410.github.io/error-pages/5XX/http-505.html) |
49+
| `506` | `506.html` | Variant Also Negotiates | [Demo 506](https://tobidi0410.github.io/error-pages/5XX/http-506.html) |
50+
| `507` | `507.html` | Insufficient Storage | [Demo 507](https://tobidi0410.github.io/error-pages/5XX/http-507.html) |
51+
| `508` | `508.html` | Loop Detected | [Demo 508](https://tobidi0410.github.io/error-pages/5XX/http-508.html) |
52+
| `509` | `509.html` | Bandwidth Limit Exceeded | [Demo 509](https://tobidi0410.github.io/error-pages/5XX/http-509.html) |
53+
| `510` | `510.html` | Not Extended | [Demo 510](https://tobidi0410.github.io/error-pages/5XX/http-510.html) |
54+
| `511` | `511.html` | Network Authentication Required | [Demo 511](https://tobidi0410.github.io/error-pages/5XX/http-511.html) |
1655

1756
Download from GitHub Pages Branch: [Download](https://github.com/ToBiDi0410/error-pages/archive/refs/heads/gh-pages.zip)
1857
---

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
"version": "1.0.0",
44
"description": "",
55
"source": [
6-
"src/http-400.pug",
7-
"src/http-401.pug",
8-
"src/http-404.pug",
9-
"src/http-502.pug"
6+
"src/4XX/*.pug",
7+
"src/5XX/*.pug"
108
],
119
"scripts": {
1210
"dev": "parcel",
@@ -24,4 +22,4 @@
2422
"parcel": "^2.14.4",
2523
"tailwindcss": "^4.1.5"
2624
}
27-
}
25+
}
File renamed without changes.

src/4XX/http-400.pug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- var code = 400;
2+
- var title = "Bad Request!";
3+
- var description = "The request is not formatted as expected by the server";
4+
- var enduserReasons = ['The request is malformed', 'A required parameter is missing'];
5+
- var enduserAdvices = ['Use the official interface', 'Follow the expected input format'];
6+
- var professionalReasons = ['The payload does not match the expected schema', 'A required query or body parameter is missing'];
7+
- var professionalAdvices = ['Provide all required fields in the correct structure', 'Respect the endpoint\'s input specification'];
8+
- var img = "data-url:http-400.jpeg";
9+
include ../http-error.pug

src/4XX/http-401.pug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- var code = 401;
2+
- var title = "Unauthorized!";
3+
- var description = "The request lacks valid authentication credentials";
4+
- var enduserReasons = ['Not logged in', 'Authentication session expired'];
5+
- var enduserAdvices = ['Log in with valid credentials', 'Refresh the session'];
6+
- var professionalReasons = ['Authentication token is invalid or expired', 'The server requires authentication for this resource'];
7+
- var professionalAdvices = ['Include a valid Authorization header', 'Renew expired authentication tokens'];
8+
- var img = "data-url:http-4XX.jpeg";
9+
include ../http-error.pug

src/4XX/http-402.pug

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// HTTP 402
2+
- var code = 402;
3+
- var title = "Payment Required!";
4+
- var description = "Access to this resource requires payment";
5+
- var enduserReasons = ['The resource requires a valid payment'];
6+
- var enduserAdvices = ['Complete the payment process'];
7+
- var professionalReasons = ['The request targets a paid service endpoint without valid billing'];
8+
- var professionalAdvices = ['Include a valid billing token or license'];
9+
- var img = "data-url:http-4XX.jpeg";
10+
include ../http-error.pug

src/4XX/http-403.pug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- var code = 403;
2+
- var title = "Forbidden!";
3+
- var description = "Access to the requested resource is denied";
4+
- var enduserReasons = ['Permissions are insufficient', 'Access is restricted'];
5+
- var enduserAdvices = ['Access the service with a permitted account'];
6+
- var professionalReasons = ['Access control rules prohibit the request', 'Authenticated user lacks the required role'];
7+
- var professionalAdvices = ['Use credentials with appropriate access rights', 'Target a permitted endpoint'];
8+
- var img = "data-url:http-4XX.jpeg";
9+
include ../http-error.pug
File renamed without changes.

src/4XX/http-404.pug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- var code = 404;
2+
- var title = "Not Found!";
3+
- var description = "The requested resource could not be found on this server";
4+
- var enduserReasons = ['The URL is incorrect', 'The resource no longer exists'];
5+
- var enduserAdvices = ['Use a valid and known link'];
6+
- var professionalReasons = ['The endpoint does not exist', 'The route or resource is not defined'];
7+
- var professionalAdvices = ['Target a valid endpoint', 'Use the current API documentation'];
8+
- var img = "data-url:http-4XX.jpeg";
9+
include ../http-error.pug

src/4XX/http-405.pug

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- var code = 405;
2+
- var title = "Method Not Allowed!";
3+
- var description = "The request method is not supported for this resource";
4+
- var enduserReasons = ['The operation is not allowed'];
5+
- var enduserAdvices = ['Use supported actions for this interface'];
6+
- var professionalReasons = ['The HTTP method is not enabled for this endpoint'];
7+
- var professionalAdvices = ['Use an allowed HTTP verb such as GET or POST'];
8+
- var img = "data-url:http-4XX.jpeg";
9+
include ../http-error.pug

0 commit comments

Comments
 (0)