Diff

util/error.lua @ 10501:e8186aba1583

util.error: Move default for numeric error code to net.http.server Stanza errors can also have numbers but these are a legacy thing and rarely used, except in MUC. HTTP errors on the other hand always have a number.
author Kim Alvefur <zash@zash.se>
date Sat, 14 Dec 2019 20:28:44 +0100
parent 10493:d9132e7412b8
child 11050:51be24b16e8a
line wrap: on
line diff
--- a/util/error.lua	Tue Dec 10 17:43:26 2019 +0100
+++ b/util/error.lua	Sat Dec 14 20:28:44 2019 +0100
@@ -21,7 +21,7 @@
 		type = template.type or "cancel";
 		condition = template.condition or "undefined-condition";
 		text = template.text;
-		code = template.code or 500;
+		code = template.code;
 
 		context = context or template.context or { _error_id = e };
 	}, error_mt);