• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alphagov / digitalmarketplace-utils / 4622
94%

Build:
DEFAULT BRANCH: master
Ran 16 Nov 2020 01:54PM UTC
Jobs 4
Files 51
Run time 26s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
4622

Pull #587

travis-ci-com

Laurence de Bruxelles
Add EmailTemplateError exception for DMNotifyClient

We want to be able to handle errors with an email template differently
to normal sending errors, as usually these will affect all attempts in a
batch script.

This commit adds a new exception EmailTemplateError as a subclass of
EmailError, and depending on the JSON response from the Notify API we
raise a different exception.

The example error for this is based on one we've seen in recent Jenkins
jobs logs [1]

```
2020-11-13 15:56:28,uuu UTC dmapiclient.base INFO API GET request on https://api.digitalmarketplace.service.gov.uk/users?supplier_id=... finished in 0.10466979281045496
API POST request on https://api.notifications.service.gov.uk/v2/notifications/email failed with 400 '[{'error': 'BadRequestError', 'message': 'Missing personalisation: application_deadline'}]'
2020-11-13 15:56:28,uuu UTC script ERROR Error sending email: ['400 BadRequestError: Missing personalisation: application_deadline']
2020-11-13 15:56:28,uuu UTC script ERROR Failed sending to ...: 400 - [{'error': 'BadRequestError', 'message': 'Missing personalisation: application_deadline'}]
```

Unfortunately this error message doesn't seem to be documented in
[the Notify docs][2], so I'm not sure whether it is stable.

[1]: https://ci.marketplace.team/job/notify-suppliers-of-framework-application-event-production/27/console
[2]: https://docs.notifications.service.gov.uk/rest-api.html#send-a-file-by-email-error-codes.
Pull Request #587:

1841 of 1968 relevant lines covered (93.55%)

3.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4622.1 16 Nov 2020 01:54PM UTC 0
93.55
Travis Job 4622.1
2 4622.2 16 Nov 2020 01:54PM UTC 0
93.55
Travis Job 4622.2
3 4622.3 16 Nov 2020 01:54PM UTC 0
93.69
Travis Job 4622.3
4 4622.4 16 Nov 2020 01:54PM UTC 0
93.69
Travis Job 4622.4
Source Files on build 4622
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #4622
  • Pull Request #587
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc