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(marxan-run): in case of any error, handle it and use failed-reason #516

Merged
merged 1 commit into from
Sep 6, 2021

Conversation

kgajowy
Copy link
Contributor

@kgajowy kgajowy commented Sep 1, 2021

Reason for using string within new Error(...) is that bullmq assumes such format so that the job data contains failedReason property derived from this very type (i.e. if processor finished throwing an error)

source: taskforcesh/bullmq#537 (comment)

@vercel
Copy link

vercel bot commented Sep 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

marxan – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan/5B5qCQh871fCb7uJiE8w9NjZRBt9
✅ Preview: https://marxan-git-fix-marxan-run-fails-vizzuality1.vercel.app

marxan-storybook – ./app

🔍 Inspect: https://vercel.com/vizzuality1/marxan-storybook/3QP6rEE7m6ssrGFd45FcdFToxrUm
✅ Preview: https://marxan-storybook-git-fix-marxan-run-fails-vizzuality1.vercel.app

Comment on lines 54 to 60
error: Error & {
errno: number;
code: number;
path: string;
syscall: string;
spawnargs: string[];
},
Copy link
Contributor

@Dyostiq Dyostiq Sep 2, 2021

Choose a reason for hiding this comment

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

Suggested change
error: Error & {
errno: number;
code: number;
path: string;
syscall: string;
spawnargs: string[];
},
error: Error | {
errno: number;
code: number;
path: string;
syscall: string;
spawnargs: string[];
},

otherwise the 'code' in error doesn't make sense

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.

3 participants