[ 
https://issues.apache.org/jira/browse/MAILBOX-284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tellier Benoit closed MAILBOX-284.
----------------------------------

Merged a few months ago

> Error handling for Attachment parser
> ------------------------------------
>
>                 Key: MAILBOX-284
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-284
>             Project: James Mailbox
>          Issue Type: Bug
>          Components: store
>    Affects Versions: master
>            Reporter: Tellier Benoit
>             Fix For: master
>
>
> ```
> java.lang.IllegalStateException: 'cid' is mandatory for inline attachments
>     at 
> org.apache.james.mailbox.model.MessageAttachment$Builder.build(MessageAttachment.java:79)
>     at 
> org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachment(MessageParser.java:106)
>     at 
> org.apache.james.mailbox.store.mail.model.impl.MessageParser.listAttachments(MessageParser.java:84)
>     at 
> org.apache.james.mailbox.store.mail.model.impl.MessageParser.retrieveAttachments(MessageParser.java:67)
>     at 
> org.apache.james.mailbox.store.StoreMessageManager.extractAttachments(StoreMessageManager.java:438)
>     at 
> org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:394)
> ```
> And exception is caught here :
> ```
>         try {
>             return messageParser.retrieveAttachments(contentIn);
>         } catch (Exception e) {
>             LOG.warn("Error while parsing mail's attachments: " + 
> e.getMessage(), e);
>             return ImmutableList.of();
>         }
> ```
> Extreme error handling : No attachment will be created for JMAP if one 
> attachement is not well formatted
> If an attachment is failing (IE inline without CID), and the message have an 
> other valid attachment, then the MessageAttachmentParser should have one 
> attachment.
> Write JMAP integration test for this too



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to