static async getErrorAttachments()

in DemoApp/app/AttachmentsProvider.js [32:49]


  static async getErrorAttachments() {
    return (async () => {
      const attachments = [];
      const [textAttachment, binaryAttachment, binaryName, binaryType] = await Promise.all([
        AttachmentsProvider.getTextAttachment(),
        AttachmentsProvider.getBinaryAttachment(),
        AttachmentsProvider.getBinaryName(),
        AttachmentsProvider.getBinaryType(),
      ]);
      if (textAttachment !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithText(textAttachment, 'hello.txt'));
      }
      if (binaryAttachment !== null && binaryName !== null && binaryType !== null) {
        attachments.push(ErrorAttachmentLog.attachmentWithBinary(binaryAttachment, binaryName, binaryType));
      }
      return attachments;
    })();
  }