mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 00:16:21 +00:00
16 lines
254 B
JavaScript
16 lines
254 B
JavaScript
|
class ClientError extends Error {
|
||
|
constructor (message, options = {}) {
|
||
|
super(message)
|
||
|
|
||
|
const {
|
||
|
statusCode
|
||
|
} = options
|
||
|
|
||
|
this.statusCode = statusCode !== undefined
|
||
|
? statusCode
|
||
|
: 400
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = ClientError
|