mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-14 08:26:22 +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
|