Comparison

util/pubsub.lua @ 8956:82f92af4b0f3

util.pubsub: Return error code known by pubsub.lib if persistent creation fails
author Kim Alvefur <zash@zash.se>
date Sun, 01 Jul 2018 04:44:24 +0200
parent 8955:ca6a09cf2829
child 9031:d1a4b1b78695
comparison
equal deleted inserted replaced
8955:ca6a09cf2829 8956:82f92af4b0f3
291 291
292 if self.config.nodestore then 292 if self.config.nodestore then
293 local ok, err = save_node_to_store(self, self.nodes[node]); 293 local ok, err = save_node_to_store(self, self.nodes[node]);
294 if not ok then 294 if not ok then
295 self.nodes[node] = nil; 295 self.nodes[node] = nil;
296 return ok, err; 296 return ok, "internal-server-error";
297 end 297 end
298 end 298 end
299 299
300 self.data[node] = self.config.itemstore(self.nodes[node].config, node); 300 self.data[node] = self.config.itemstore(self.nodes[node].config, node);
301 self.events.fire_event("node-created", { node = node, actor = actor }); 301 self.events.fire_event("node-created", { node = node, actor = actor });