cairo/lib/vix/ClientErrors.ts
Dunemask 0fc5f05b6a
Some checks failed
Deploy Edge / deploy-edge (push) Failing after 2s
S3 Repo Backup / s3-repo-backup (push) Failing after 2s
[INIT] Initial Project Structure
2024-08-24 12:41:04 -06:00

25 lines
1.2 KiB
TypeScript

import { ClientError } from "@dunemask/vix/bridge";
export class AuthErrors {
static readonly UnauthorizedRequiredProject = new ClientError(401, "Project required!");
static readonly UnauthorizedRequiredToken = new ClientError(401, "Token required!");
static readonly UnauthorizedRequiredUser = new ClientError(401, "User not set!");
static readonly UnauthorizedRole = new ClientError(403, "Insufficient Privileges");
static readonly UnauthorizedRequest = new ClientError(401, "Unauthorized!");
static readonly ForbiddenPermissions = new ClientError(403, "Insufficient privileges!");
}
export class UserErrors {
static readonly ConflictIdentityTaken = new ClientError(409, "Identity taken!");
}
export class ProjectErrors {
static readonly BadRequestSlugInvalid = new ClientError(400, "Project slug invalid!");
static readonly BadRequestProjectIncomplete = new ClientError(400, "Project incomplete!");
static readonly UnexpectedRootUserError = new ClientError(500, "Error creating root user!");
static readonly ConflictNonUnique = new ClientError(409, "Slug already taken!");
}
export class KeyPairErrors {
static readonly NotFoundKeypair = new ClientError(400, "Keypair not found!");
}