node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

Add 'Network error handling' section to documentation

Open phpbg opened this issue 2 years ago • 5 comments

Description

Document network errors handling and reconnect strategy


Checklist

  • [x] Does npm test pass with this change (including linting)?
  • [x] Is the new or changed code fully tested?
  • [x] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

phpbg avatar Sep 02 '22 10:09 phpbg

I think it'll fit better in the client-configuration.md file

leibale avatar Sep 02 '22 18:09 leibale

i didn't even notice there was more doc... lol

I guess it isn't relevant anymore?

phpbg avatar Sep 02 '22 20:09 phpbg

@phpbg I think that we should merge your changes into that doc somehow.. :)

leibale avatar Sep 12 '22 01:09 leibale

ok, i'll move them to client-configuration.md

phpbg avatar Sep 14 '22 20:09 phpbg

@leibale It should be in better shape now ;-)

phpbg avatar Sep 16 '22 15:09 phpbg

@leibale @chayim I let you merge as I don't have write access

phpbg avatar Oct 21 '22 16:10 phpbg

@phpbg sorry for the long dealy, I was on vacation..

leibale avatar Oct 21 '22 16:10 leibale

Codecov Report

Base: 95.85% // Head: 95.85% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (42910c8) compared to base (5dd7d31). Patch coverage: 94.85% of modified lines in pull request are covered.

:exclamation: Current head 42910c8 differs from pull request most recent head e90eb9a. Consider uploading reports for the commit e90eb9a to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2250    +/-   ##
========================================
  Coverage   95.85%   95.85%            
========================================
  Files         433      451    +18     
  Lines        4001     4247   +246     
  Branches      451      475    +24     
========================================
+ Hits         3835     4071   +236     
- Misses        102      106     +4     
- Partials       64       70     +6     
Impacted Files Coverage Δ
packages/search/lib/commands/SEARCH.ts 82.60% <71.42%> (-9.70%) :arrow_down:
packages/client/lib/client/socket.ts 77.96% <81.08%> (-2.04%) :arrow_down:
packages/client/lib/client/index.ts 92.00% <94.73%> (+0.58%) :arrow_up:
packages/graph/lib/graph.ts 96.29% <96.29%> (ø)
packages/bloom/lib/commands/bloom/CARD.ts 100.00% <100.00%> (ø)
packages/bloom/lib/commands/bloom/index.ts 100.00% <100.00%> (ø)
packages/bloom/lib/commands/t-digest/ADD.ts 100.00% <100.00%> (ø)
packages/bloom/lib/commands/t-digest/BYRANK.ts 100.00% <100.00%> (ø)
packages/bloom/lib/commands/t-digest/BYREVRANK.ts 100.00% <100.00%> (ø)
packages/bloom/lib/commands/t-digest/CDF.ts 100.00% <100.00%> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Jan 18 '23 19:01 codecov-commenter

Blocked by #2373 - will need some updates as this PR changes reconnectStrategy a bit:

  1. It now can be set to false to disable reconnect (instead of a function that always returns an error)
  2. The function now gets a new parameter - cause: unknown - which is the thing that was thrown and triggered reconnect (the type is unknown and not Error because anything is throwable in JS).

@phpbg wanna make these changes or do you prefer I'll do it?

leibale avatar Jan 19 '23 21:01 leibale

Merging as is, will make the changes in #2373

leibale avatar Jan 24 '23 14:01 leibale