UNPKG
@blackglory/http-status
Version:
latest (2.0.4)
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.3
1.0.2
1.0.1
1.0.0
0.2.0
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
A class-based HTTP status library
github.com/BlackGlory/http-status
BlackGlory/http-status
@blackglory/http-status
/
src
/
http-error.ts
9 lines
(7 loc)
•
251 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{
HTTPStatus
}
from
'./http-status.js'
import
{
CustomError
}
from
'@blackglory/errors'
export
class
HTTPError
extends
CustomError
implements
HTTPStatus
{
constructor
(
public
readonly
code
:
number
,
message
:
string
) {
super
(message) } }