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

yarpc / yarpc-go / 664 / 1

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2016 05:21PM UTC
Files 43
Run time 2s
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

29 Apr 2016 05:18PM UTC coverage: 87.22% (-1.2%) from 88.43%
664.1

push

travis-ci

abhinav
Client side errors and crossdock tests (#114)

This implements support for consistent errors on the client side. Clients will
only see `transport.UnexpectedError` or `transport.BadRequestError`.

The design for errors is:

- Certain error types are `HandlerError`s. The Inbound has to know how to
  handle these. Examples: BadRequest and Unexpected.
- Other error types know how to convert themselves into HandlerErrors by
  implementing proving a `AsHandlerError() error` function. For example,
  UnknownProcedureError knows that it should be converted into a
  BadRequestError.
- All other error types are converted into UnexpectedErrors with information
  about the procedure and service.

The hierarchy we have is,

```
BadRequestError                 HandlerError
 |                                        |
 +--------> localBadRequestError <--------+
 |                                        |
 +--------> remoteBadRequestError         |
                                          |
UnexpectedError                           |
 |                                        |
 +--------> localUnexpectedError <--------+
 |
 +--------> remoteUnexpectedError
```

Note that only the `local` versions of the error types are valid
`HandlerError`s. That is, only the local versions make it to the Inbound as-is
and must be handled (resulting in a 400-level error for `BadRequest` and
500-level for `Unexpected`). If a remote version of either error is returned by
a `Handler`, it causes a *new* `UnexpectedError` which includes the procedure
name and service for that call. This way, we end up with full information for
multi-hop failures:

    UnexpectedError: error for procedure "foo" of service "a":
        UnexpectedError: error for procedure "bar" of service "b":
            BadRequest: unrecognized procedure "baz" for service "c"

1481 of 1698 relevant lines covered (87.22%)

0.95 hits per line

Source Files on job 664.1
  • Tree
  • List 0
  • Changed 9
  • Source Changed 9
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 664
  • Travis Job 664.1
  • 6ae4bd40 on github
  • Prev Job for on master (#651.1)
  • Next Job for on master (#667.1)
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