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

share / sharedb
96%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix-lib-hasown-lagacy
DEFAULT BRANCH: master
Repo Added 10 Mar 2016 07:44AM CUT
Files 39
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

LAST BUILD ON BRANCH downgrade-stack-warn
branch: downgrade-stack-warn
CHANGE BRANCH
x
Reset
  • downgrade-stack-warn
  • 1.x-beta
  • ServerStream-clone
  • Teamwork-fix-whenNothingPending
  • add-connection-tests
  • after-write
  • async-2
  • backend-docs
  • broken-connection
  • bug-fix/broken-hard-rollback
  • bug-fix/broken-presence-hardrollback
  • close-milestone-database
  • db-method-options
  • delay-op-for-query-poll
  • delete-docs
  • doc-images-with-height
  • error-codes
  • eslint
  • examples-ws-update
  • fetch-snapshot-middleware
  • fix-272
  • fix-docs
  • fix-flaky-test
  • fix-lib-hasown-lagacy
  • fix-projection-queries
  • fix-tests-sync-unsub
  • fix-textarea-example
  • getops-options
  • handshake
  • held-ops
  • initialise-paused
  • leadership-readme-update
  • logger-override
  • master
  • middleware-docs-reply
  • null-milestone-db
  • op-batch
  • otapply-rollback
  • presence
  • presence-call-each
  • presence-destroy
  • presence-example
  • presence-resubscribe
  • read-docs-middleware
  • readSnapshots-context
  • readSnapshots-specific-errors
  • remove-deprecated-middleware
  • remove-duplicated-type
  • remove-mingo-dep
  • reorganize-pubsub-adapters
  • reply-middleware
  • revert-263-readSnapshots-context
  • revert-shallow-copy-op
  • run-sharedb-mongo-tests
  • server-plugin-query
  • show
  • silence-logger-in-tests
  • snapshot-by-timestamp
  • snapshot-request-test
  • snapshot-throw
  • test-error-visibility
  • test-fixes
  • test-query-poll-doc
  • unsubscribe-bug
  • update-dependencies
  • update-examples
  • update-snapshot-docs
  • use-async
  • use-loglevel
  • v0.11.35
  • v0.11.36
  • v0.11.37
  • v1.0.0
  • v1.0.0-beta.1
  • v1.0.0-beta.10
  • v1.0.0-beta.11
  • v1.0.0-beta.12
  • v1.0.0-beta.13
  • v1.0.0-beta.14
  • v1.0.0-beta.15
  • v1.0.0-beta.16
  • v1.0.0-beta.17
  • v1.0.0-beta.18
  • v1.0.0-beta.19
  • v1.0.0-beta.2
  • v1.0.0-beta.20
  • v1.0.0-beta.21
  • v1.0.0-beta.22
  • v1.0.0-beta.23
  • v1.0.0-beta.24
  • v1.0.0-beta.25
  • v1.0.0-beta.26
  • v1.0.0-beta.27
  • v1.0.0-beta.28
  • v1.0.0-beta.29
  • v1.0.0-beta.3
  • v1.0.0-beta.30
  • v1.0.0-beta.31
  • v1.0.0-beta.4
  • v1.0.0-beta.5
  • v1.0.0-beta.6
  • v1.0.0-beta.7
  • v1.0.0-beta.8
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.3.4
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.5.0
  • v2
  • yet-another-presence

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

Relevant lines Covered
Build:
Build:
5194 RELEVANT LINES 4984 COVERED LINES
465.02 HITS PER LINE
Source Files on downgrade-stack-warn
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 1
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/LineBranch HitsBranch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
1140 downgrade-stack-warn 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 ... Pull #317 21 Oct 2019 09:43AM CUT web-flow travis-ci pending completion  
1139 downgrade-stack-warn <a href="https://github.com/share/sharedb/commit/8556a1820">&lt;a href=&quot;https://github.com/share/sharedb/commit/</a><a class="double-link" href="https://github.com/share/sharedb/commit/&lt;a class=&quot;double-l... push 21 Oct 2019 09:43AM CUT Alec Gibson travis-ci pending completion  
See All Builds (1414)
  • Repo on GitHub
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

© 2025 Coveralls, Inc