You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to better consume the errors produced by cnquery/cnspec during scans, we need to start structuring these errors a bit more.
Specifically, we need to identify when an error is an auth-based error vs some other scan error.
This will help all consumers of cnquery to more appropriately respond to errors through automated systems.
example:
cnspec scan aws
-> results in auth error bc missing or expired creds
as an example, we could read the error and ensure the statusCode aligns to what we all expect/agree on to signify an auth error (401/403)
type cnqueryError struct {
statusCode int32
message string
}
the consumer of the error could then send a better message to the user about what went wrong/wrap the error message in a helpful way in automated scenarios
things to consider:
this work is provider-specific
The text was updated successfully, but these errors were encountered:
In order to better consume the errors produced by cnquery/cnspec during scans, we need to start structuring these errors a bit more.
Specifically, we need to identify when an error is an auth-based error vs some other scan error.
This will help all consumers of cnquery to more appropriately respond to errors through automated systems.
example:
cnspec scan aws
-> results in auth error bc missing or expired creds
as an example, we could read the error and ensure the statusCode aligns to what we all expect/agree on to signify an auth error (401/403)
type cnqueryError struct {
statusCode int32
message string
}
the consumer of the error could then send a better message to the user about what went wrong/wrap the error message in a helpful way in automated scenarios
things to consider:
The text was updated successfully, but these errors were encountered: