Plug.Exception

Plug.Exception protocol

A protocol that extends exceptions to be status-code aware.

By default, it looks for an implementation of the protocol, otherwise checks if the exception has the :plug_status field or simply returns 500.

Summary

Types

t()

Functions

status(exception)

Receives an exception and returns its HTTP status code

Types

t()

t() :: term

Functions

status(exception)

status(t) :: Plug.Conn.status

Receives an exception and returns its HTTP status code.

© 2013 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/plug/Plug.Exception.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部