-
Notifications
You must be signed in to change notification settings - Fork 573
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
feat: error transfer between typescript and golang #5676
base: main
Are you sure you want to change the base?
Conversation
|
cliv2/cmd/cliv2/main.go
Outdated
@@ -29,6 +27,7 @@ import ( | |||
"github.com/snyk/go-application-framework/pkg/instrumentation" | |||
"github.com/snyk/go-application-framework/pkg/local_workflows/network_utils" | |||
"github.com/snyk/go-application-framework/pkg/local_workflows/output_workflow" | |||
_ "github.com/snyk/go-application-framework/pkg/networking/fips_enable" |
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.
Issue: please move this to be the first import ;)
return err | ||
} | ||
|
||
data, fileErr := os.ReadFile(filePath) |
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.
Suggestion: I'm contemplating if we should be more tolerant and allow the file to be optional? Because otherwise we might fail to run to the end and show the actual issue.
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.
Also I guess you might be able to move this logic to its own function
Pull Request Submission Checklist
What does this PR do?
Iterating on the work from #5626, this adds the possibility of sending errors originating from the TypeScript CLI to our Golang CLI. The errors are wrapped in our generic Error Catalog model before being serialized as JSON API errors and written in the temporary error file used as a mean for IPC.
Where should the reviewer start?
How should this be manually tested?
Related
CLI-646