1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-25 04:45:57 +00:00

add mvc.Err builtin dependency to map any context/mvc response's.Err field on methods like HandleHTTPError

relative to: https://github.com/kataras/iris/issues/1606
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-31 15:26:30 +03:00
parent f20e7f1ecc
commit 7f7d8df9c0
4 changed files with 37 additions and 1 deletions

View File

@@ -168,6 +168,9 @@ var BuiltinDependencies = []*Dependency{
NewDependency(func(ctx *context.Context) Code {
return Code(ctx.GetStatusCode())
}).Explicitly(),
NewDependency(func(ctx *context.Context) Err {
return Err(ctx.GetErr())
}).Explicitly(),
// payload and param bindings are dynamically allocated and declared at the end of the `binding` source file.
}