QlikElixir.Error (qlik_elixir v0.2.1)

View Source

Custom error types for QlikElixir operations.

Summary

Functions

Creates an authentication error.

Creates a configuration error.

Creates a file exists error.

Creates a file not found error.

Creates a file too large error.

Creates a network error.

Creates a new error with the given type and message.

Creates an unknown error.

Creates an upload error.

Creates a validation error.

Types

error_type()

@type error_type() ::
  :validation_error
  | :upload_error
  | :authentication_error
  | :configuration_error
  | :file_exists_error
  | :file_not_found
  | :file_too_large
  | :network_error
  | :unknown_error

t()

@type t() :: %QlikElixir.Error{
  details: map() | nil,
  message: String.t(),
  request: map() | nil,
  response: map() | nil,
  type: error_type()
}

Functions

authentication_error(message, opts \\ [])

@spec authentication_error(
  String.t(),
  keyword()
) :: t()

Creates an authentication error.

configuration_error(message, opts \\ [])

@spec configuration_error(
  String.t(),
  keyword()
) :: t()

Creates a configuration error.

file_exists_error(message, opts \\ [])

@spec file_exists_error(
  String.t(),
  keyword()
) :: t()

Creates a file exists error.

file_not_found(message, opts \\ [])

@spec file_not_found(
  String.t(),
  keyword()
) :: t()

Creates a file not found error.

file_too_large(message, opts \\ [])

@spec file_too_large(
  String.t(),
  keyword()
) :: t()

Creates a file too large error.

network_error(message, opts \\ [])

@spec network_error(
  String.t(),
  keyword()
) :: t()

Creates a network error.

new(type, message, opts \\ [])

@spec new(error_type(), String.t(), keyword()) :: t()

Creates a new error with the given type and message.

unknown_error(message, opts \\ [])

@spec unknown_error(
  String.t(),
  keyword()
) :: t()

Creates an unknown error.

upload_error(message, opts \\ [])

@spec upload_error(
  String.t(),
  keyword()
) :: t()

Creates an upload error.

validation_error(message, opts \\ [])

@spec validation_error(
  String.t(),
  keyword()
) :: t()

Creates a validation error.