UNPKG

@thisisagile/easy-express

Version:

Straightforward library for building domain-driven microservice architectures

19 lines (18 loc) 464 B
// src/express/AuthError.ts import { isError } from "@thisisagile/easy"; var AuthError = class extends Error { status; constructor({ name, status }) { super(name); this.name = "AuthenticationError"; this.status = status; } }; var authError = (status) => new AuthError(status); var isAuthError = (e) => isError(e) && e.name === "AuthenticationError"; export { AuthError, authError, isAuthError }; //# sourceMappingURL=chunk-RL5ICAHT.mjs.map