mirror of
https://github.com/hanzoai/gui.git
synced 2026-10-25 02:31:41 +00:00
Stripe, Supabase, Bento, Takeout, seats, licenses and coupons came with the fork of the site and sold nothing here. Identity is Hanzo IAM and there is no store, so the forty-four routes, the purchase flow and the theme-history persistence go, and what remains is a docs site.
13 lines
459 B
TypeScript
13 lines
459 B
TypeScript
// a user-facing error. apiRoute returns its message + status to the client, so
|
|
// throw this for validation / business errors the caller is meant to see (e.g.
|
|
// "That name is taken"). Plain Errors are treated as internal and return a
|
|
// generic 500 with no detail leaked.
|
|
export class ClientError extends Error {
|
|
status: number
|
|
constructor(message: string, status = 400) {
|
|
super(message)
|
|
this.name = 'ClientError'
|
|
this.status = status
|
|
}
|
|
}
|