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

[Bug] 회원가입 시 쿼리 수행 오류 #213

Open
WooYeonSeo opened this issue Dec 17, 2019 · 0 comments
Open

[Bug] 회원가입 시 쿼리 수행 오류 #213

WooYeonSeo opened this issue Dec 17, 2019 · 0 comments
Assignees

Comments

@WooYeonSeo
Copy link
Contributor

회원가입시 findUserWithEmail 부분에서 아래와 같이 서버에서 에러납니다.

  • 파일 : 2019-17/server/src/utils/parseDB.ts:14:20
  • 소스상에서 get(0)을 하던데 처음 회원가입 하는 경우에는 데이터가 없기 때문에 발생하는 에러 같습니다.
(node:88801) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
    at Object.getNode (/Users/yeon/dev/workspace_js/boostcamp_member/2019-17/server/src/utils/parseDB.ts:14:20)
    at /Users/yeon/dev/workspace_js/boostcamp_member/2019-17/server/src/schema/user/user.ts:35:16
    at step (/Users/yeon/dev/workspace_js/boostcamp_member/2019-17/server/src/schema/user/user.ts:33:23)
    at Object.next (/Users/yeon/dev/workspace_js/boostcamp_member/2019-17/server/src/schema/user/user.ts:14:53)
    at fulfilled (/Users/yeon/dev/workspace_js/boostcamp_member/2019-17/server/src/schema/user/user.ts:5:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:88801) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
beingPracticer added a commit that referenced this issue Dec 18, 2019
에러처리를 하기위해서 object에 상태값을 넣어서 에러를 발생시켰습니다.
graphql의 resolver부분의 catch에서 ErrorResolver를 통해서 적절한 메세지를 생성하여 넘겨줍니다.
잘못된 변수 req.email을 email로 수정하였습니다.
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

No branches or pull requests

2 participants