"""Constants for errors/exceptions.""" S3_FILE_NOT_FOUND_CODE = 's3_file_not_found' S3_METADATA_NOT_FOUND_CODE = 's3_metadata_not_found' POST_ASSET_ERROR_CODE = 'post_asset_error' ACKNOWLEDGE_ERROR_CODE = 'acknowledge_error' STOP_V2_PROCESSING_CODE = 'stop_v2_processing' ERROR_MESSAGES = { S3_FILE_NOT_FOUND_CODE: '{key} not found in bucket {bucket}!', S3_METADATA_NOT_FOUND_CODE: ('{key} not found in {filename} object' ' metadata (bucket {bucket})'), POST_ASSET_ERROR_CODE: 'post asset failed with code {code}', ACKNOWLEDGE_ERROR_CODE: ( 'An error occurred during the acknowledge. Error message: {message}' ), } POST_ASSET_ERROR_MESSAGE = ( 'Failed to post to ows-assets from {source}.' 'Status: {status}; text: {text}')