-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: print error when docker build fails #2489
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
Conversation
@@ -42,7 +42,7 @@ export const buildDocker = async ( | |||
await mechanizeDockerContainer(application); | |||
writeStream.write("\nDocker Deployed: ✅\n"); | |||
} catch (error) { | |||
writeStream.write("❌ Error"); | |||
writeStream.write("❌ ${error}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this we should do something like, because error can be an object
writeStream.write("❌ ${error}"); | |
writeStream.write("❌ ${error instanceof Error ? error.message : "Unknown error"}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But `${new Error('message')}`
is evaluated to Error: message
without losing information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, that code does nothing; it will only print ${error} as a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮😅
@@ -42,7 +42,7 @@ export const buildDocker = async ( | |||
await mechanizeDockerContainer(application); | |||
writeStream.write("\nDocker Deployed: ✅\n"); | |||
} catch (error) { | |||
writeStream.write("❌ Error"); | |||
writeStream.write("❌ ${error}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, that code does nothing; it will only print ${error} as a string.
What is this PR about?
We keep getting errors like:
No one knows what the problem is...
Checklist
Before submitting this PR, please make sure that:
canary
branch.