Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: shall re-throw errors on first connect #18

Merged
merged 4 commits into from
Apr 28, 2018

Conversation

legendecas
Copy link
Contributor

@legendecas legendecas commented Apr 15, 2018

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Referring to issue No retries are made after "failed to connect on first connect", errors on first connection shall be re-thrown so that egg will exit with the error in time.

Expect resolving #2403

@codecov
Copy link

codecov bot commented Apr 15, 2018

Codecov Report

Merging #18 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #18   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines          44     44           
=====================================
  Hits           44     44
Impacted Files Coverage Δ
lib/mongoose.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b281b15...513af4b. Read the comment docs.

@popomore
Copy link
Member

popomore commented Apr 20, 2018

You can add awaitFrist(db, [ 'error', 'connected']) in beforeStart to check which event is emited.

@legendecas
Copy link
Contributor Author

legendecas commented Apr 26, 2018

@popomore Updated! 😄

@popomore
Copy link
Member

it's await-first,and you should add testcase for error case.

@legendecas
Copy link
Contributor Author

@popomore Hi! Tests are included 😀

@popomore popomore merged commit dde9037 into eggjs:master Apr 28, 2018
@popomore
Copy link
Member

fengmk2 pushed a commit that referenced this pull request Aug 12, 2023
[skip ci]

## 1.0.0 (2023-08-12)

### ⚠ BREAKING CHANGES

* Drop Node.js < 14 and egg < 3 support

### Features

* [BREAKING_CHANGE] add unregular model judgement ([#7](#7)) ([ffde348](ffde348))
* bump mongoose version to 5.0 ([#20](#20)) ([a3405d6](a3405d6))
* first implement ([#2](#2)) ([45419ad](45419ad))
* support mongoose global plugin ([#35](#35)) ([1f450fb](1f450fb))
* support multi client ([#15](#15)) ([22d134b](22d134b))
* support plugins for special clients ([#41](#41)) ([67f8f1f](67f8f1f))
* update mongoose's version to be compatable with typescript schemas (Nodejs >=14.x), with Egg>=3.x ([#54](#54)) ([c87f19d](c87f19d))

### Bug Fixes

* doc typo. ([#40](#40)) ([8ef2ebc](8ef2ebc))
* fix __mongoose refer ([#16](#16)) ([b281b15](b281b15))
* hide password of mongo url ([#32](#32)) ([441b6fc](441b6fc))
* remove heartbeat ([#4](#4)) ([343cc78](343cc78))
* replace auth with string replace ([#34](#34)) ([5b9f8ba](5b9f8ba))
* shall re-throw errors on first connect ([#18](#18)) ([dde9037](dde9037))
* **typescript:** types of mongoose should be dependencies ([#24](#24)) ([de7e54e](de7e54e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants