All files / shared/types/api errors.ts

100% Statements 22/22
100% Branches 0/0
100% Functions 6/6
100% Lines 22/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45                      57x 57x 57x 57x 57x 57x 57x 57x 57x     57x 57x 57x 57x     57x 57x     57x 57x     57x 57x     57x 57x 57x    
export interface ApiResult {
  status: "success";
  message: string;
}
 
export interface ApiError {
  status: "error";
  errorId: string;
  message: string;
}
 
export enum MongoDbError {
  UNKNOWN_ERROR = "unknownError",
  PROGRAM_ITEM_NOT_FOUND = "programItemNotFound",
  USER_NOT_FOUND = "userNotFound",
  SIGNUP_QUESTION_NOT_FOUND = "signupQuestionNotFound",
  SIGNUP_NOT_FOUND = "signupNotFound",
  SETTINGS_NOT_FOUND = "settingsNotFound",
  USER_OR_LOG_ITEM_NOT_FOUND = "userOrLogItemNotFound",
  ASSIGNMENT_LOCK_HELD = "assignmentLockHeld",
}
 
export enum KompassiError {
  UNKNOWN_ERROR = "unknownError",
  NO_PROGRAM_ITEMS = "noProgramItems",
  INVALID_RESPONSE = "invalidResponse",
}
 
export enum KompassiLoginError {
  UNKNOWN_ERROR = "unknownError",
}
 
export enum AssignmentError {
  UNKNOWN_ERROR = "unknownError",
}
 
export enum BcryptError {
  UNKNOWN_ERROR = "unknownError",
}
 
export enum QueueError {
  QUEUE_NOT_INITIALIZED = "queueNotInitialized",
  FAILED_TO_PUSH = "failedToPush",
}