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

share / sharedb / 1140 / 3
96%
master: 97%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 21 Oct 2019 09:44AM UTC
Files 28
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

21 Oct 2019 09:42AM UTC coverage: 95.957%. Remained the same
1140.3

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`

1165 of 1392 branches covered (83.69%)

2492 of 2597 relevant lines covered (95.96%)

155.01 hits per line

Source Files on job 1140.3
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1103
  • Travis Job 1140.3
  • 23c312b2 on github
  • Prev Job for on downgrade-stack-warn (#1138.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