Spaces:
Paused

practice-pod / mock-app /core /errors.js
EnergyVenom's picture
Practice pod (mock app)
4b7f560 verified
Raw History Blame Contribute Delete
324 Bytes
'use strict';
// Shared error type for the mock shell and every module pack (HTTP status + machine code + human message).
class AppError extends Error {
constructor(status, code, message) { super(message); this.status = status; this.code = code; }
}
module.exports = { AppError, err: (s, c, m) => new AppError(s, c, m) };