aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-18 15:26:35 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-18 15:26:35 +0100
commit7fdb4cf5e437701686ec32a6a4c4a79e6909f0a7 (patch)
treec9a992a40d242d9eeaa6584be75618712ccd11d7 /util/pubsub.lua
parent84a825533fefa3df91d2f0d61870375862d4ea1e (diff)
downloadprosody-7fdb4cf5e437701686ec32a6a4c4a79e6909f0a7.tar.gz
prosody-7fdb4cf5e437701686ec32a6a4c4a79e6909f0a7.zip
util.pubsub, pubsub.lib: Improve error on attempt to publish invalid item
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r--util/pubsub.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua
index 3fbf1b45..c449625a 100644
--- a/util/pubsub.lua
+++ b/util/pubsub.lua
@@ -509,7 +509,7 @@ function service:publish(node, actor, id, item, required_config)
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);