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

bigeasy / reactor / 212 / 2
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2017 03:42PM UTC
Files 3
Run time 1s
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

28 Oct 2017 08:18AM UTC coverage: 90.431% (+0.4%) from 90.05%
212.2

push

travis-ci

bigeasy
Sketch of universal arrayed response.

Create a univeral arrayed response that can be used with both `throw`
and `return`. One that preserves the notion of returning just an error
code when all you want to do is trigger an error whose status code alone
describes the error (i.e. 404).

`throw` can still be used to throw just a code and stop the request with
an error. You can still `throw` a string to affect a redirection.

Previously, the status code would have been the second argument after
the returned body. This meant you had to provide a body before the
status code. This means you can't fall on the default of using the
description as the body when all you really want to do is communicate
the error code.

Now you can return just a status code. Return just the status code and
you'll get the same behavior as if you threw the status code. If you
return just a body, that is, return a single thing that is not a number,
that is the body and the status code is OK.

If you want to return an integer as your JSON body you're going to have
to provide a status code even if the status code is the default 200.

72 of 87 branches covered (82.76%)

189 of 209 relevant lines covered (90.43%)

4.68 hits per line

Source Files on job 212.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 212
  • Travis Job 212.2
  • 4a4b05bc on github
  • Prev Job for on master (#211.3)
  • Next Job for on master (#213.2)
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