mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
util.error: Add well-known field 'code' in error templates
Intended to be for HTTP-ish numeric status codes
This commit is contained in:
parent
9f13e20ffe
commit
03adb50555
2 changed files with 3 additions and 0 deletions
|
@ -14,6 +14,7 @@ local function new(e, context, registry)
|
|||
type = template.type or "cancel";
|
||||
condition = template.condition or "undefined-condition";
|
||||
text = template.text;
|
||||
code = template.code or 500;
|
||||
|
||||
context = context or template.context or { _error_id = e };
|
||||
}, error_mt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue