Phoenix.MissingParamError

Phoenix.MissingParamError exception

Raised when a key is expected to be present in the request parameters, but is not.

This exception is raised by Phoenix.Controller.scrub_params/2 which:

  • Checks to see if the required_key is present (can be empty)
  • Changes all empty parameters to nils (“” -> nil).

If you are seeing this error, you should handle the error and surface it to the end user. It means that there is a parameter missing from the request.

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.MissingParamError.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部