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

chore(server): print stack in case of worker error #15632

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

etnoy
Copy link
Contributor

@etnoy etnoy commented Jan 24, 2025

Sometimes we get an error in the microservices worker, like the following: porsager/postgres#944

Currently, when this happens the error message is very terse, like

microservices worker error: TypeError: Cannot read properties of undefined (reading 'replace'),

This PR also prints the error stack so we instead get

microservices worker error: TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace')
    at queryError (/usr/src/app/node_modules/postgres/cjs/src/connection.js:389:48)
    at errored (/usr/src/app/node_modules/postgres/cjs/src/connection.js:384:17)
    at connectTimedOut (/usr/src/app/node_modules/postgres/cjs/src/connection.js:257:5)
    at Timeout.done [as _onTimeout] (/usr/src/app/node_modules/postgres/cjs/src/connection.js:1033:8)
    at listOnTimeout (node:internal/timers:596:11)
    at process.processTimers (node:internal/timers:529:7)

@jrasm91 jrasm91 merged commit 10e518d into main Jan 25, 2025
38 checks passed
@jrasm91 jrasm91 deleted the chore/postgres-error-stack branch January 25, 2025 03:45
vladd11 pushed a commit to vladd11/immich that referenced this pull request Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants