You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
307 B
11 lines
307 B
4 years ago
|
import {HTTPStatus, Message} from '../const/http.ts'
|
||
|
|
||
|
export default class HTTPError extends Error {
|
||
|
constructor(
|
||
|
public readonly http_status: HTTPStatus,
|
||
|
public readonly http_message?: string
|
||
|
) {
|
||
|
super(`HTTP ${http_status}: ${http_message || Message[http_status]}`)
|
||
|
}
|
||
|
}
|