Diff

util/pubsub.lua @ 9207:76d593b35958

util.pubsub, pubsub.lib: Improve error on attempt to publish invalid item
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Aug 2018 15:26:35 +0100
parent 9206:33ee40dc3e25
child 9218:7e27dc4d100b
line wrap: on
line diff
--- a/util/pubsub.lua	Sat Aug 18 15:10:41 2018 +0100
+++ b/util/pubsub.lua	Sat Aug 18 15:26:35 2018 +0100
@@ -509,7 +509,7 @@
 		return false, "precondition-not-met";
 	end
 	if not self.config.itemcheck(item) then
-		return nil, "internal-server-error";
+		return nil, "invalid-item";
 	end
 	local node_data = self.data[node];
 	local ok = node_data:set(id, item);