manicanldes-backend/src/common/errors/b2b-artwork-errors.ts

83 lines
2.1 KiB
TypeScript

export const B2B_ARTWORK_ERRORS = {
B2B_ARTWORK_NOT_FOUND: [
404,
'Artwork project not found',
'Scoped B2B artwork project lookup failed',
],
B2B_ARTWORK_VERSION_NOT_FOUND: [
404,
'Artwork version not found',
'Scoped B2B artwork version lookup failed',
],
B2B_ARTWORK_ACCOUNT_UNVERIFIED: [
409,
'Business account must be verified for artwork',
'B2B artwork verification gate failed',
],
B2B_ARTWORK_VERSION_PENDING: [
409,
'Current artwork version awaits a decision',
'B2B artwork pending version blocks upload',
],
B2B_ARTWORK_VERSION_LIMIT: [
409,
'Artwork project reached its version limit',
'B2B artwork version limit reached',
],
B2B_ARTWORK_PROJECT_LIMIT: [
409,
'Business account reached its artwork project limit',
'B2B artwork project limit reached',
],
B2B_ARTWORK_DECISION_EXISTS: [
409,
'Artwork version already has a decision',
'B2B artwork duplicate decision',
],
B2B_ARTWORK_OLD_VERSION: [
409,
'Only the latest artwork version can be reviewed',
'B2B artwork stale version review',
],
B2B_ARTWORK_SELF_REVIEW: [
403,
'A different staff member must review this artwork',
'B2B artwork self-review rejected',
],
B2B_ARTWORK_DOWNLOAD_PENDING: [
403,
'Artwork is awaiting approval',
'B2B artwork pending download denied',
],
B2B_ARTWORK_DOWNLOAD_REJECTED: [
403,
'Rejected artwork cannot be downloaded with read access',
'B2B artwork rejected download denied',
],
B2B_ARTWORK_FILE_REQUIRED: [
400,
'Artwork file is required',
'B2B artwork upload missing',
],
B2B_ARTWORK_FILE_TOO_LARGE: [
400,
'Artwork file exceeds the size limit',
'B2B artwork upload over size',
],
B2B_ARTWORK_FILENAME_INVALID: [
400,
'Artwork filename is invalid',
'B2B artwork upload filename rejected',
],
B2B_ARTWORK_FILE_INVALID: [
400,
'Artwork file content or type is invalid',
'B2B artwork upload bytes or type rejected',
],
B2B_ARTWORK_INTEGRITY_FAILURE: [
500,
'Artwork file integrity check failed',
'B2B artwork stored digest mismatch',
],
} as const;