"""Constants for errors/exceptions.""" S3_FILE_NOT_FOUND_CODE = 's3_file_not_found' IMAGE_VALIDATION_ERROR_CODE = 'image_validation_error' IMAGE_WRONG_ASSET_UPLOAD_TYPE_ERROR_CODE = 'image_wrong_asset_upload_type_error' IMAGE_TOO_SMALL_DIMENSIONS_CODE = 'image_too_small_dimensions_error' IMAGE_TOO_LARGE_DIMENSIONS_CODE = 'image_too_large_dimensions_error' IMAGE_WRONG_ASPECT_RATIO_CODE = 'image_wrong_aspect_ratio_error' IMAGE_INVALID_MODE_CODE = 'image_invalid_mode' IMAGE_NOT_OPAQUE_CODE = 'image_not_opaque' ERROR_MESSAGES = { S3_FILE_NOT_FOUND_CODE: '{key} not found in bucket {bucket}!', IMAGE_VALIDATION_ERROR_CODE: ( 'An error occurred during image validation: Error message: {message}' ), IMAGE_WRONG_ASSET_UPLOAD_TYPE_ERROR_CODE: ( '{key} file (bucket {bucket}) has wrong asset upload type ({type})' ), IMAGE_TOO_SMALL_DIMENSIONS_CODE: 'Image dimensions are too small', IMAGE_TOO_LARGE_DIMENSIONS_CODE: 'Image dimensions are too large', IMAGE_WRONG_ASPECT_RATIO_CODE: 'Image has non-square aspect ratio', IMAGE_INVALID_MODE_CODE: 'Invalid image mode: {mode}', IMAGE_NOT_OPAQUE_CODE: 'Image is not opaque' }