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

mitodl / micromasters / 15940
71%
master: 0%

Build:
Build:
LAST BUILD BRANCH: gs/cleanup_nginx_conf
DEFAULT BRANCH: master
Ran 29 Jul 2019 05:19PM UTC
Jobs 2
Files 112
Run time 36s
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
15940

push

travis-ci

Alice Pote
Fixed promise error handling

In many places where we use Promises (e.g. for making fetch requests to
our backend APIs) we were previously incorrectly handling promise
rejection. We were often doing `promise.then(fn).catch(fn)`, which is not
a great idea - then the `.catch` handler catches any errors in the
Promise AND any errors in the `.then` handler. Instead, we should prefer
to do `promise.then(resolve, reject)` - this makes the `reject` handler
narrower in it's responsibility.

The main problem with the former pattern is that the `.catch` handler
can swallow any exceptions which occur in the `.then` handler, and we
will not see them. This can lead to strange and unhelpful stack traces
(such as the react `getHostNode` error that crops up sometimes).

Anyway, this PR should fix it! I also simplified and streamlined our
`fetchJSONWithCSRF` function while I was at it.

pr #3022

244 of 361 branches covered (67.59%)

564 of 791 relevant lines covered (71.3%)

10.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 15940.1 (name=Python) 29 Jul 2019 05:19PM UTC 0
71.3
Travis Job 15940.1
2 15940.2 (name=Python-Selenium) 29 Jul 2019 05:19PM UTC 0
71.3
Travis Job 15940.2
Source Files on build 15940
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #15940
  • 824fd75e 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