Delete errors.js
This commit is contained in:
parent
28d51ec760
commit
a6a25251ee
@ -1,30 +0,0 @@
|
|||||||
function $default(res, errorDetails) {
|
|
||||||
return res.status(400).json({
|
|
||||||
status: "error",
|
|
||||||
message: "Validation Failed",
|
|
||||||
details: errorDetails
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function legacy(res, errorDetails) {
|
|
||||||
return res.status(200).json({
|
|
||||||
success: false,
|
|
||||||
code: 900,
|
|
||||||
err_msg: errorDetails
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function minimal(res, errorDetails) {
|
|
||||||
return res.status(400).send(`ERR:${JSON.stringify(errorDetails)}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
function secure(res, errorDetails) {
|
|
||||||
return res.status(401).json({ error: "Unauthorized or Invalid Request" })
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
default: $default,
|
|
||||||
legacy,
|
|
||||||
minimal,
|
|
||||||
secure
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user