View Source Beacon.Content.ErrorPage (Beacon v0.3.3)

Stores a template which can be rendered for error responses.

An ErrorPage contains four main fields:

  • :status - the status code for which this ErrorPage is to be used
  • :template - the template to be rendered
  • :site - the Beacon site which should use this page
  • :layout_id - the ID of the Beacon Layout which is used for rendering

Do not create or edit ErrorPages manually

Use the public functions in Beacon.Content instead. The functions in that module guarantee that all dependencies are created correctly and all processes are updated. Manipulating data manually will most likely result in inconsistent behavior and crashes.

Summary

Types

error_status()

@type error_status() ::
  511
  | 510
  | 508
  | 507
  | 506
  | 505
  | 504
  | 503
  | 502
  | 501
  | 500
  | 451
  | 431
  | 429
  | 428
  | 426
  | 425
  | 424
  | 423
  | 422
  | 421
  | 418
  | 417
  | 416
  | 415
  | 414
  | 413
  | 412
  | 411
  | 410
  | 409
  | 408
  | 407
  | 406
  | 405
  | 404
  | 403
  | 402
  | 401
  | 400

t()

@type t() :: %Beacon.Content.ErrorPage{
  __meta__: term(),
  id: Ecto.UUID.t(),
  inserted_at: DateTime.t(),
  layout: Beacon.Content.Layout.t(),
  layout_id: Ecto.UUID.t(),
  site: Beacon.Types.Site.t(),
  status: error_status(),
  template: binary(),
  updated_at: DateTime.t()
}

Functions

valid_statuses()