You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Fetcher.processEmails() there is a loop in which Fetcher.processMessage() is called for each email. This retrieves the raw email and calls TicketApiController.processEmail(). Here the elseif (!is_array($data)) test leads to a call to ApiController.parseEmail() which in turn calls ApiController::parseRequest(). If the parser fails, Controller.exerror() is called which calls Controller.onFatalError(). This in turn calls an abstract function onError(), which in the ApiController´s case should lead to the error being logged and an exception being thrown and then there's an exit().
We just had an email in our IMAP mailbox that failed to parse. But we didn't get anything in the log. Email processing simply stopped silently. Based on the code I can't explain it. Perhaps there's some code path inside ApiEmailDataParser that leads to an exit() as well? I had to pull the email as it was a complete showstopper for our support so I can no longer reproduce it. The mail had a 26MB file attachment and unfortunately I can't share it.
To conclude, I see two issues:
Why wasn't anything logged? I can't explain it.
Even if it was logged, Controller.onFatalError() has an exit() inside. This means email processing will always abort if it encounters an unparseable e-mail. That seems pretty harsh to me?
The text was updated successfully, but these errors were encountered:
In
Fetcher.processEmails()
there is a loop in whichFetcher.processMessage()
is called for each email. This retrieves the raw email and callsTicketApiController.processEmail()
. Here theelseif (!is_array($data))
test leads to a call toApiController.parseEmail()
which in turn callsApiController::parseRequest()
. If the parser fails,Controller.exerror()
is called which callsController.onFatalError()
. This in turn calls an abstract functiononError()
, which in theApiController
´s case should lead to the error being logged and an exception being thrown and then there's anexit()
.We just had an email in our IMAP mailbox that failed to parse. But we didn't get anything in the log. Email processing simply stopped silently. Based on the code I can't explain it. Perhaps there's some code path inside
ApiEmailDataParser
that leads to anexit()
as well? I had to pull the email as it was a complete showstopper for our support so I can no longer reproduce it. The mail had a 26MB file attachment and unfortunately I can't share it.To conclude, I see two issues:
Controller.onFatalError()
has anexit()
inside. This means email processing will always abort if it encounters an unparseable e-mail. That seems pretty harsh to me?The text was updated successfully, but these errors were encountered: