File size: 330 Bytes
af1bee9
 
 
 
 
 
1
2
3
4
5
6
7
'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) };