mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-15 08:56: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
|