fix: inherit App error catalogs on generated routes without local errors
This commit is contained in:
@@ -299,7 +299,8 @@ func (c *Context) WriteError(err error) {
|
||||
}
|
||||
|
||||
// SetErrorRegistry sets an application fallback. Route encoders can supply their
|
||||
// own registry; clones retain both policies without any process-global lookup.
|
||||
// own nonempty registry; an encoder without a registry inherits this fallback.
|
||||
// Clones retain both policies without any process-global lookup.
|
||||
func (c *Context) SetErrorRegistry(r *apierrors.Registry) { c.errorRegistry = r }
|
||||
func (c *Context) ResolveError(err error) *apierrors.APIError {
|
||||
registry := c.errorRegistry
|
||||
|
||||
Reference in New Issue
Block a user