UNPKG

@furystack/rest

Version:
14 lines 469 B
/** * Throw inside a `RequestAction` to short-circuit with a specific HTTP * status. `ErrorAction` translates this to `JsonResult({ message }, responseCode)`. * Prefer this over plain `Error` (`furystack/rest-action-use-request-error` * enforces this). */ export class RequestError extends Error { responseCode; constructor(msg, responseCode) { super(msg); this.responseCode = responseCode; } } //# sourceMappingURL=request-error.js.map