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

promise 예외 캐치시 error로그를 남깁니다 #9

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

devgrapher
Copy link

https://github.com/green-labs/farmmorning-backend/pull/6656 이 이슈 상황에서 15초 타임아웃을 해결해보려고 했는데요,
해결방법을 찾기 전에 일단 로그라도 남깁니다.

(resolve/deliver! l-prom result))
(fn [error]
(log/error "Error in promise!" error)
(resolve/deliver! l-prom nil {:message (.getMessage error)}))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

예외 발생시에 prom/catch에 의해서 요 콜백으로 떨어지는데요,
resolve/deliver! 요걸 호출하다 또 예외가 나더군요.. ㅎㅎ

왜냐면 이미 then쪽에서 deliver!를 했고(resolve-promise의 status가 바꼈고) callback을 호출하다가 터지는 상황인데,
deliver!를 또하면 중복호출이라고 또 다른 예외가 나게되어있습니다. 그렇다고 이걸 지울수도 없고..

@devgrapher devgrapher requested a review from namenu June 26, 2024 07:07
@namenu namenu merged commit 571b884 into master Jun 26, 2024
@namenu
Copy link
Member

namenu commented Jun 26, 2024

#2 이거랑 같은 증상일 수도 있겠군요.

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