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

yarpc / yarpc-go / 664

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

pending completion
664

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%)

1.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 664.1 29 Apr 2016 05:21PM UTC 0
87.22
Travis Job 664.1
2 664.2 29 Apr 2016 05:21PM UTC 0
87.22
Travis Job 664.2
Source Files on build 664
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #664
  • 6ae4bd40 on github
  • Prev Build on master (#651)
  • Next Build on master (#667)
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