Skip to content

render_errors doesn't work with 2 options #1879

@noma4i

Description

@noma4i

Environment

  • Elixir version 1.3.2
  • Phoenix version (mix deps): 1.2
  • Operating system: macos

Expected behavior

render_errors: [accepts: ~w(html json)]

Errors both works for html or json specified ways.

Actual behavior

html - ok
json - Phoenix.Template.HTML.encode_to_iodata!(%{errors: %{message: "Not Found"}})

BUT! If you define only HTML or JSON at a time in accepts it will work correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions