-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from Elagoht:feat/descriptive-error-codes
Feat/descriptive-error-codes
- Loading branch information
Showing
3 changed files
with
53 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Exit Codes | ||
|
||
Exit codes are required to specify specific exit situations. This application is design to be implemented to a HTTP server. So decied to make exit codes look like HTTP status codes: | ||
|
||
| Status | Exit Code | Referring to HTTP | | ||
|--------------------------|-----------|-------------------| | ||
| Success | must be 0 | 200 | | ||
| Created | must be 0 | 201 | | ||
| See Other | 33 | 303 | | ||
| Bad Request | 40 | 400 | | ||
| Unauthorized | 41 | 401 | | ||
| Forbidden | 43 | 403 | | ||
| Not Found | 44 | 404 | | ||
| Not Acceptable | 46 | 406 | | ||
| Conflict | 49 | 409 | | ||
| Unsupported Media Type | 45 | 415 | | ||
| Internal Server Error | 50 | 500 | | ||
|
||
If you want to know more about HTTP status codes, you can visit [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status). | ||
|
||
## Ask for Help | ||
|
||
Help wanted! If you can map every verb command to their exit codes, edit this file and please create a pull request. Thank you! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters