[
  {
    "code": "ACCESS_DENIED",
    "category": "AUTHORIZATION",
    "userMessage": "Access denied - you are not a participant in this group",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ACCOUNT_ALREADY_DELETED",
    "category": "CONFLICT",
    "userMessage": "Account is already deleted",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ACCOUNT_ANONYMIZED",
    "category": "CONFLICT",
    "userMessage": "Account has been anonymized and cannot be restored",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ACCOUNT_DELETED",
    "category": "AUTHENTICATION",
    "userMessage": "Account has been deleted",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ACCOUNT_INACTIVE",
    "category": "AUTHORIZATION",
    "userMessage": "User account is not active",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ACCOUNT_NOT_DELETED",
    "category": "CONFLICT",
    "userMessage": "Account is not deleted",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ALREADY_ACTIVE",
    "category": "CONFLICT",
    "userMessage": "Organization is already active",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ALREADY_INACTIVE",
    "category": "CONFLICT",
    "userMessage": "Organization is already inactive",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ALREADY_VERIFIED",
    "category": "CONFLICT",
    "userMessage": "Email is already verified",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ASSIGNMENT_EXISTS",
    "category": "CONFLICT",
    "userMessage": "User is already assigned to this lake",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ASSIGNMENT_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake assignment not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "BAD_REQUEST",
    "category": "VALIDATION",
    "userMessage": "Comments are not allowed on this article",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CANNOT_TARGET_ADMIN",
    "category": "VALIDATION",
    "userMessage": "Admin accounts cannot be deleted or anonymized",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CANNOT_TARGET_SELF",
    "category": "VALIDATION",
    "userMessage": "You cannot perform this action on your own account",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CATEGORY_HAS_THREADS",
    "category": "CONFLICT",
    "userMessage": "Cannot delete category with existing threads",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CHALLENGE_ALREADY_USED",
    "category": "CONFLICT",
    "userMessage": "This verification challenge has already been used",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CODE_EXPIRED",
    "category": "VALIDATION",
    "userMessage": "Verification code has expired",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "COMPANY_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Company not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "COMPANY_REQUIRED",
    "category": "VALIDATION",
    "userMessage": "Organizations must specify a company",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "CONFLICT",
    "category": "CONFLICT",
    "userMessage": "That action conflicts with the current state of the data.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "EMAIL_DOMAIN_INVALID",
    "category": "MAIL",
    "userMessage": "That email address can't receive mail. Please check the domain and try again.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "EMAIL_IN_USE",
    "category": "CONFLICT",
    "userMessage": "This email is already in use",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "EMAIL_NOT_VERIFIED",
    "category": "AUTHENTICATION",
    "userMessage": "Email not verified",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FILE_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "The requested file could not be found.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FILE_TOO_LARGE",
    "category": "VALIDATION",
    "userMessage": "The file is too large. The maximum allowed size is 50MB.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN",
    "category": "AUTHORIZATION",
    "userMessage": "You don't have permission to do that.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_DELETE",
    "category": "AUTHORIZATION",
    "userMessage": "You can only delete your own lake data",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_LAKE_EDIT",
    "category": "AUTHORIZATION",
    "userMessage": "You do not have permission to edit this lake",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_MODERATION",
    "category": "AUTHORIZATION",
    "userMessage": "You do not have POI moderation permissions",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_PARAMETER_ADD",
    "category": "AUTHORIZATION",
    "userMessage": "You can only add parameters to your own POIs",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_PARAMETER_REMOVE",
    "category": "AUTHORIZATION",
    "userMessage": "You can only remove parameters from your own POIs",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "FORBIDDEN_UPDATE",
    "category": "AUTHORIZATION",
    "userMessage": "You can only update your own lake data",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INTERNAL_ERROR",
    "category": "INTERNAL",
    "userMessage": "Something went wrong on our end. Please try again.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": true
  },
  {
    "code": "INTERNAL_SERVER_ERROR",
    "category": "INTERNAL",
    "userMessage": "Something went wrong on our end. Please try again.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": true
  },
  {
    "code": "INVALID_CHALLENGE",
    "category": "VALIDATION",
    "userMessage": "Invalid or expired verification challenge",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_CITY",
    "category": "VALIDATION",
    "userMessage": "Invalid city selected for company",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_CODE",
    "category": "VALIDATION",
    "userMessage": "Incorrect verification code",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_COMPANY",
    "category": "VALIDATION",
    "userMessage": "Invalid company selected",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_COMPANY_SELECTION",
    "category": "VALIDATION",
    "userMessage": "Cannot specify both existing company and new company",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_COUNTRY",
    "category": "VALIDATION",
    "userMessage": "Invalid country selected",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_CREDENTIALS",
    "category": "AUTHENTICATION",
    "userMessage": "Invalid credentials",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_FILE_TYPE",
    "category": "VALIDATION",
    "userMessage": "Invalid file type. Only images (JPEG, PNG, GIF, WEBP) are allowed.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_GEOMETRY_DATA",
    "category": "VALIDATION",
    "userMessage": "Must provide either coordinates and longitude/latitude (for polygon) or longitude and latitude (for point).",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_INPUT",
    "category": "VALIDATION",
    "userMessage": "Either groupId (for existing conversation) or receiverId + subject (for new conversation) must be provided",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_LAKE_TYPE",
    "category": "VALIDATION",
    "userMessage": "Invalid lake type selected",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_PASSWORD",
    "category": "AUTHENTICATION",
    "userMessage": "The password you entered is incorrect.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_PERMISSIONS",
    "category": "VALIDATION",
    "userMessage": "Some permissions do not exist",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_RECEIVER_STATUS",
    "category": "VALIDATION",
    "userMessage": "Cannot send message to inactive or deleted user",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_ROLE",
    "category": "VALIDATION",
    "userMessage": "Invalid role selected",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "INVALID_TOKEN",
    "category": "VALIDATION",
    "userMessage": "Invalid verification token",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_DATA_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake data not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_DATA_TYPE_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake data type not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_EXISTS",
    "category": "CONFLICT",
    "userMessage": "A lake with this name already exists in the selected country",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_HAS_DATA",
    "category": "CONFLICT",
    "userMessage": "Cannot delete lake with existing data. Please remove all lake data first.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_PARAMETER_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake parameter not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_TYPE_EXISTS",
    "category": "CONFLICT",
    "userMessage": "A lake type with this name already exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_TYPE_IN_USE",
    "category": "CONFLICT",
    "userMessage": "This lake type is in use by existing lakes and cannot be deleted.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LAKE_TYPE_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake type not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "LOGOUT_ERROR",
    "category": "INTERNAL",
    "userMessage": "Failed to logout",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "MAIL_SEND_FAILED",
    "category": "MAIL",
    "userMessage": "We couldn't send that email. Please try again later.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": true
  },
  {
    "code": "MESSAGE_READ",
    "category": "CONFLICT",
    "userMessage": "Cannot update a message that has been read",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NO_CONTENT_CHANGES",
    "category": "VALIDATION",
    "userMessage": "No content changes provided",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NO_COUNTRY_AVAILABLE",
    "category": "INTERNAL",
    "userMessage": "Cannot create the placeholder user: no country exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NO_FILE_PROVIDED",
    "category": "VALIDATION",
    "userMessage": "No file provided",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NO_FILES_PROVIDED",
    "category": "VALIDATION",
    "userMessage": "No files provided",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NO_PERMISSION",
    "category": "AUTHORIZATION",
    "userMessage": "You can only view versions of your own articles",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NOT_AUTHENTICATED",
    "category": "AUTHENTICATION",
    "userMessage": "You need to sign in to continue.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "The requested item could not be found.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NOT_ORGANIZATION",
    "category": "VALIDATION",
    "userMessage": "User is not an organization",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "NOTIFICATION_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Notification not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "ORGANIZATION_DELETED",
    "category": "CONFLICT",
    "userMessage": "Cannot activate deleted organization",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "OTP_COOLDOWN",
    "category": "RATE_LIMIT",
    "userMessage": "Please wait before requesting another code",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PARAMETER_ALREADY_EXISTS",
    "category": "CONFLICT",
    "userMessage": "Parameter already exists for this POI",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PARAMETER_EXISTS",
    "category": "CONFLICT",
    "userMessage": "A parameter with this name already exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PARAMETER_IN_USE",
    "category": "CONFLICT",
    "userMessage": "Cannot delete parameter that is being used by POIs. Please remove it from all POIs first.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PARAMETER_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Lake parameter not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PERMISSION_EXISTS",
    "category": "CONFLICT",
    "userMessage": "Permission already exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PERMISSION_NAME_EXISTS",
    "category": "CONFLICT",
    "userMessage": "Permission name already exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "PERMISSION_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "Permission not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "POI_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "POI not found",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "RESTORATION_EXPIRED",
    "category": "VALIDATION",
    "userMessage": "Account restoration period has expired",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "SAME_EMAIL",
    "category": "VALIDATION",
    "userMessage": "New email must be different from current email",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "SERVER_UNREACHABLE",
    "category": "EXTERNAL",
    "userMessage": "Can't reach the server. Check your connection and try again.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": false
  },
  {
    "code": "SERVICE_UNAVAILABLE",
    "category": "EXTERNAL",
    "userMessage": "The service is temporarily unavailable. Please try again shortly.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": true
  },
  {
    "code": "SESSION_EXPIRED",
    "category": "AUTHENTICATION",
    "userMessage": "Your session has expired. Please sign in again.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "SLUG_EXISTS",
    "category": "CONFLICT",
    "userMessage": "Category slug already exists",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "THREAD_LOCKED",
    "category": "CONFLICT",
    "userMessage": "Cannot reply to locked thread",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "TIMEOUT",
    "category": "EXTERNAL",
    "userMessage": "The request timed out. Please try again.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": false
  },
  {
    "code": "TOKEN_EXPIRED",
    "category": "VALIDATION",
    "userMessage": "Verification token has expired",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "TOO_MANY_ATTEMPTS",
    "category": "RATE_LIMIT",
    "userMessage": "Too many attempts; request a new code",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "TOO_MANY_REQUESTS",
    "category": "RATE_LIMIT",
    "userMessage": "Too many requests. Please wait a moment and try again.",
    "userFacing": true,
    "retryable": true,
    "emittedByApi": true
  },
  {
    "code": "UPLOAD_FAILED",
    "category": "INTERNAL",
    "userMessage": "Failed to upload files",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_ALREADY_ANONYMIZED",
    "category": "CONFLICT",
    "userMessage": "User is already anonymized",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_ALREADY_DELETED",
    "category": "CONFLICT",
    "userMessage": "User is already deleted",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_ALREADY_INACTIVE",
    "category": "CONFLICT",
    "userMessage": "User is already deactivated",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_DELETED",
    "category": "CONFLICT",
    "userMessage": "Cannot suspend deleted user",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_EXISTS",
    "category": "CONFLICT",
    "userMessage": "An account with this email already exists.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "USER_NOT_FOUND",
    "category": "NOT_FOUND",
    "userMessage": "The requested user could not be found.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "VALIDATION_ERROR",
    "category": "VALIDATION",
    "userMessage": "Some of the information you entered is invalid. Please review the highlighted fields.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  },
  {
    "code": "VERIFICATION_EMAIL_NOT_SENT",
    "category": "MAIL",
    "userMessage": "Your account was created, but the verification email didn't go out. You can resend it.",
    "userFacing": true,
    "retryable": false,
    "emittedByApi": true
  }
]
