Closed Bug 1495901 Opened 2 years ago Closed 2 years ago

SES type checking error

Categories

(bugzilla.mozilla.org :: General, enhancement)

Production
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: dylan)

References

()

Details

Attachments

(1 file)

We seem to be expecting different input than we're receiving.

Reference {"bounce" => {"bounceSubType" => "General","bounceType" => "...} did not pass type constraint "Dict[bounce=>Dict[bounceSubType=>Str,bounceType=>Str,bouncedRecipients=>ArrayRef[Dict[action=>Str,diagnosticCode=>Str,emailAddress=>Str,slurpy Any]],reportingMTA=>Str,slurpy Any],slurpy Any]" (in $_[1]) at /app/Bugzilla/Quantum/SES.pm line 108
    Reference {"bounce" => {"bounceSubType" => "General","bounceType" => "...} did not pass type constraint "Dict[bounce=>Dict[bounceSubType=>Str,bounceType=>Str,bouncedRecipients=>ArrayRef[Dict[action=>Str,diagnosticCode=>Str,emailAddress=>Str,slurpy Any]],reportingMTA=>Str,slurpy Any],slurpy Any]" (in $_[1])
    "Dict[bounce=>Dict[bounceSubType=>Str,bounceType=>Str,bouncedRecipients=>ArrayRef[Dict[action=>Str,diagnosticCode=>Str,emailAddress=>Str,slurpy Any]],reportingMTA=>Str,slurpy Any],slurpy Any]" constrains value at key "bounce" of hash with "Dict[bounceSubType=>Str,bounceType=>Str,bouncedRec
Attached file GitHub Pull Request
The problem is that some fields (like diagnostic code) are actually optional.
I fixed that, and also made the type checking more standard.
Merged to master.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.