UNPKG

simple-auth-cli

Version:

An implementation of authentication system supporting multiple providers ready to be used with a single command.

23 lines (21 loc) 518 B
class apiError extends Error { constructor( statusCode, message= "Something went wrong", errors = [], stack = "" ){ super(message) this.statusCode = statusCode this.data = null this.message = message this.success = false; this.errors = errors if (stack) { this.stack = stack } else{ Error.captureStackTrace(this, this.constructor) } } } export {apiError}