https://github.com/tiny-go/errors
Collection of HTTP errors implementations
https://github.com/tiny-go/errors
Last synced: 5 days ago
JSON representation
Collection of HTTP errors implementations
- Host: GitHub
- URL: https://github.com/tiny-go/errors
- Owner: tiny-go
- License: mit
- Created: 2018-04-25T06:39:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-30T14:47:57.000Z (about 3 years ago)
- Last Synced: 2025-08-14T21:11:00.543Z (6 months ago)
- Language: Go
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# errors
[![Build Status][circleci-badge]][circleci-link]
[![Report Card][report-badge]][report-link]
[![GoCover][cover-badge]][cover-link]
Collection of HTTP error implementations
### HTTP error interface
```go
type Error interface{
error
Code() int
}
```
### Implementations
Code | Corresponding error type
-----|--------------------------
400 | `BadRequest`
401 | `Unauthorized`
403 | `Forbidden`
404 | `NotFound`
405 | `MethodNotAllowed`
406 | `NotAcceptable`
408 | `RequestTimeout`
409 | `Conflict`
500 | `InternalServer`
501 | `NotImplemented`
503 | `ServiceUnavailable`
[circleci-badge]: https://circleci.com/gh/tiny-go/errors.svg?style=shield
[circleci-link]: https://circleci.com/gh/tiny-go/errors
[report-badge]: https://goreportcard.com/badge/github.com/tiny-go/errors
[report-link]: https://goreportcard.com/report/github.com/tiny-go/errors
[cover-badge]: https://gocover.io/_badge/github.com/tiny-go/errors
[cover-link]: https://gocover.io/github.com/tiny-go/errors