Merge pull request #588 from BeaudanBrown/simple-error

Give a simple error instead of logging a failed null check
pull/599/head
Beaudan Campbell-Brown 6 years ago committed by GitHub
commit 85d45196a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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