Phoenix.NotAcceptableError

Phoenix.NotAcceptableError exception

Raised when one of the accept* headers is not accepted by the server.

This exception is commonly raised by Phoenix.Controller.accepts/2 which negotiates the media types the server is able to serve with the contents the client is able to render.

If you are seeing this error, you should check if you are listing the desired formats in your :accepts plug or if you are setting the proper accept header in the client. The exception contains the acceptable mime types in the accepts field.

Summary

Functions

exception(msg)
message(exception)

Functions

exception(msg)

Specs

exception(String.t) :: Exception.t
exception(Keyword.t) :: Exception.t

message(exception)

Specs

message(Exception.t) :: String.t

© 2014 Chris McCord
Licensed under the MIT License.
https://hexdocs.pm/phoenix/Phoenix.NotAcceptableError.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部