Browse Source
* allocate new stacktrace for debugging * move errors into functionssession-estimator
Jake Verbaten
2 years ago
committed by
GitHub
2 changed files with 17 additions and 10 deletions
@ -1,8 +1,14 @@ |
|||
exports.UNKNOWN_COMMAND = 1 |
|||
exports.INVALID_TOKEN = 2 |
|||
|
|||
exports.TIMEOUT = new Error('Request timed out') |
|||
exports.TIMEOUT.code = 'ETIMEDOUT' |
|||
exports.createTimeoutError = () => { |
|||
const timeoutErr = new Error('Request timed out') |
|||
timeoutErr.code = 'ETIMEDOUT' |
|||
return timeoutErr |
|||
} |
|||
|
|||
exports.DESTROY = new Error('Request destroyed') |
|||
exports.DESTROY.code = 'EDESTROYED' |
|||
exports.createDestroyedError = () => { |
|||
const destroyErr = new Error('Request destroyed') |
|||
destroyErr.code = 'EDESTROYED' |
|||
return destroyErr |
|||
} |
|||
|
Loading…
Reference in new issue