2024-08-24 12:41:04 -06:00
|
|
|
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!");
|
2024-09-03 02:35:38 +00:00
|
|
|
static readonly NotFoundProject = new ClientError(404, "Project not found!");
|
2024-08-24 12:41:04 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export class KeyPairErrors {
|
|
|
|
static readonly NotFoundKeypair = new ClientError(400, "Keypair not found!");
|
|
|
|
}
|