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

share / sharedb / 1140
96%
master: 97%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 21 Oct 2019 09:43AM UTC
Jobs 3
Files 56
Run time 41s
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
1140

Pull #317

travis-ci

web-flow
Downgrade middleware stack dump from `warn` to `info`

At the moment, if middleware ever returns an `Error` object, its stack
trace will get dumped into `logger.warn`. This can be quite noisy,
especially if those errors are part of normal control flow (eg
authentication).

This behaviour can currently be avoided by passing just a `string` to
the middleware callback (rather than an `Error` object). However, this
is not the "standard" behaviour for callbacks, which will typically be
called with an actual `Error` object, rather than a `string` (eg Node's
[`fs` module][1]).

This change downgrades the logging from `warn` (surprising, but non-
critical) to `info` (unsurprising), so that the information is still
available to those who want it, but doesn't get the same sort of
importance assigned to it as other things we `warn` about, such as:

  - [stream errors][2]
  - [`Agent` close errors][3]
  - [bad messages][4]
  - [bad acks][5]

If consumers want more information about the errors that they are
themselves returning, they can naturally add their own logging logic,
too.

[1]: https://nodejs.org/api/fs.html
[2]: https://github.com/share/sharedb/blob/4f8176172/lib/stream-socket.js#L40
[3]: https://github.com/share/sharedb/blob/<a class=hub.com/share/sharedb/commit/<a class="double-link" href="https://git"><a class=hub.com/share/sharedb/commit/985146528a9f63c2ba2d91f99fada7dedf62138a">985146528/lib/agent.js#L51
[4]: https://github.com/share/sharedb/blob/985146528a9f63c2ba2d91f99fada7dedf62138a/lib/client/connection.js#L121
[5]: https://github.com/share/sharedb/blob/985146528a9f63c2ba2d91f99fada7dedf62138a/lib/client/doc.js#L849
Pull Request #317: Downgrade middleware stack dump from `warn` to `info`

2330 of 2784 branches covered (83.69%)

1 of 1 new or added line in 1 file covered. (100.0%)

4984 of 5194 relevant lines covered (95.96%)

465.02 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1140.1 21 Oct 2019 09:43AM UTC 0
95.96
Travis Job 1140.1
2 1140.2 21 Oct 2019 09:43AM UTC 0
95.96
Travis Job 1140.2
3 1140.3 21 Oct 2019 09:44AM UTC 0
95.96
Travis Job 1140.3
Source Files on build 1140
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1140
  • Pull Request #317
  • PR Base - master (#1138)
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