Skip to main content

ERROR_CONSTANTS

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/config/constants / ERROR_CONSTANTS

Variable: ERROR_CONSTANTS

const ERROR_CONSTANTS: { CODES: { FILE_NOT_FOUND: string; INVALID_INPUT: string; NETWORK_ERROR: string; PARSE_ERROR: string; PERMISSION_DENIED: string; STATE_ERROR: string; UNKNOWN_ERROR: string; VALIDATION_ERROR: string; }; MESSAGES: { FILE_NOT_FOUND: string; INVALID_INPUT: string; NETWORK_ERROR: string; PARSE_ERROR: string; PERMISSION_DENIED: string; STATE_ERROR: string; UNKNOWN_ERROR: string; VALIDATION_ERROR: string; }; }

Defined in: utils/config/constants.js:288

Error handling constants

Type Declaration​

CODES​

CODES: { FILE_NOT_FOUND: string; INVALID_INPUT: string; NETWORK_ERROR: string; PARSE_ERROR: string; PERMISSION_DENIED: string; STATE_ERROR: string; UNKNOWN_ERROR: string; VALIDATION_ERROR: string; }

Error codes

CODES.FILE_NOT_FOUND​

FILE_NOT_FOUND: string = "FILE_NOT_FOUND"

CODES.INVALID_INPUT​

INVALID_INPUT: string = "INVALID_INPUT"

CODES.NETWORK_ERROR​

NETWORK_ERROR: string = "NETWORK_ERROR"

CODES.PARSE_ERROR​

PARSE_ERROR: string = "PARSE_ERROR"

CODES.PERMISSION_DENIED​

PERMISSION_DENIED: string = "PERMISSION_DENIED"

CODES.STATE_ERROR​

STATE_ERROR: string = "STATE_ERROR"

CODES.UNKNOWN_ERROR​

UNKNOWN_ERROR: string = "UNKNOWN_ERROR"

CODES.VALIDATION_ERROR​

VALIDATION_ERROR: string = "VALIDATION_ERROR"

MESSAGES​

MESSAGES: { FILE_NOT_FOUND: string; INVALID_INPUT: string; NETWORK_ERROR: string; PARSE_ERROR: string; PERMISSION_DENIED: string; STATE_ERROR: string; UNKNOWN_ERROR: string; VALIDATION_ERROR: string; }

Default error messages

MESSAGES.FILE_NOT_FOUND​

FILE_NOT_FOUND: string = "File not found"

MESSAGES.INVALID_INPUT​

INVALID_INPUT: string = "Invalid input provided"

MESSAGES.NETWORK_ERROR​

NETWORK_ERROR: string = "Network connection error"

MESSAGES.PARSE_ERROR​

PARSE_ERROR: string = "Failed to parse file"

MESSAGES.PERMISSION_DENIED​

PERMISSION_DENIED: string = "Permission denied"

MESSAGES.STATE_ERROR​

STATE_ERROR: string = "Application state error"

MESSAGES.UNKNOWN_ERROR​

UNKNOWN_ERROR: string = "An unknown error occurred"

MESSAGES.VALIDATION_ERROR​

VALIDATION_ERROR: string = "Input validation failed"