mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 00:19:41 +02:00
Assorted changes from recent sessions: - .gitignore: add mana-sync binary, Forgejo data - chat/web: add isSidebarMode to navigation store - clock/web: fix alarm page markup - contacts/mukke/presi/questions: add svelte.config.js aliases - context/web: add missing dependency - manacore/landing: update pricing page - manacore/web + todo/web: update mana dashboard pages - planta/web: fix dashboard layout - pnpm-lock.yaml: cleanup after backend removals - docs/APP_GAP_ANALYSIS.md: new gap analysis doc - services/mana-analytics: add Dockerfile - services/mana-subscriptions: new Go subscription service Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
917 B
TypeScript
43 lines
917 B
TypeScript
import { HTTPException } from 'hono/http-exception';
|
|
|
|
export class BadRequestError extends HTTPException {
|
|
constructor(message: string) {
|
|
super(400, { message });
|
|
}
|
|
}
|
|
|
|
export class UnauthorizedError extends HTTPException {
|
|
constructor(message = 'Unauthorized') {
|
|
super(401, { message });
|
|
}
|
|
}
|
|
|
|
export class ForbiddenError extends HTTPException {
|
|
constructor(message = 'Forbidden') {
|
|
super(403, { message });
|
|
}
|
|
}
|
|
|
|
export class NotFoundError extends HTTPException {
|
|
constructor(message = 'Not found') {
|
|
super(404, { message });
|
|
}
|
|
}
|
|
|
|
export class ConflictError extends HTTPException {
|
|
constructor(message = 'Conflict') {
|
|
super(409, { message });
|
|
}
|
|
}
|
|
|
|
export class InsufficientCreditsError extends HTTPException {
|
|
constructor(
|
|
public readonly required: number,
|
|
public readonly available: number
|
|
) {
|
|
super(402, {
|
|
message: 'Insufficient credits',
|
|
cause: { required, available },
|
|
});
|
|
}
|
|
}
|