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

alphagov / digitalmarketplace-utils / 4622 / 4
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 16 Nov 2020 01:54PM UTC
Files 51
Run time 4s
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

16 Nov 2020 01:54PM UTC coverage: 93.695%. First build
4622.4

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:

1902 of 2030 relevant lines covered (93.69%)

0.94 hits per line

Source Files on job 4622.4
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3986
  • Travis Job 4622.4
  • f3906157 on github
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