Give a simple error instead of logging a failed null check

pull/588/head
Beaudan Brown 6 years ago
parent 5d2c15fd24
commit 72b60077c7

@ -203,7 +203,13 @@ MessageSender.prototype = {
({ server } = this);
}
const { url, id } = await server.putAttachment(attachmentData);
const result = await server.putAttachment(attachmentData);
if (!result) {
return Promise.reject(
new Error('Failed to upload data to attachment fileserver')
);
}
const { url, id } = result;
proto.id = id;
proto.url = url;
proto.contentType = attachment.contentType;

Loading…
Cancel
Save