S3 error representation.
Backend callbacks return {:error, %Firkin.Error{}} to signal errors.
The :code atom is mapped to the corresponding S3 error code string and
HTTP status by Firkin.Error.to_http_status/1 and Firkin.Error.to_s3_code/1.
Summary
Functions
Returns the HTTP status code for the given error code.
Returns the S3 error code string for the given error code atom.
Types
@type error_code() ::
:access_denied
| :bucket_already_exists
| :bucket_not_empty
| :entity_too_large
| :internal_error
| :invalid_argument
| :invalid_bucket_name
| :invalid_part
| :invalid_part_order
| :no_such_bucket
| :no_such_key
| :no_such_upload
| :not_implemented
| :precondition_failed
| :not_modified
| :signature_does_not_match
@type t() :: %Firkin.Error{ code: error_code(), message: String.t() | nil, request_id: String.t() | nil, resource: String.t() | nil }
Functions
@spec to_http_status(error_code()) :: pos_integer()
Returns the HTTP status code for the given error code.
@spec to_s3_code(error_code()) :: String.t()
Returns the S3 error code string for the given error code atom.