Skip to content

Commit

Permalink
Merge pull request #49 from atomist-skills/fix-custom-error-creation
Browse files Browse the repository at this point in the history
create custom error type properly
  • Loading branch information
chrispatrick authored Feb 8, 2024
2 parents d27da95 + 0fa1f6c commit 4c44198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion policy/policy_handler/async.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func buildAsyncDataSources(multipleQuerySupport bool) dataSourceProvider {
if len(queryResponse.Errors) > 0 {
errorMessage := queryResponse.Errors[0].Message
if errorMessage == "An unexpected error has occurred" {
return nil, fmt.Errorf("async query contained error: %s", errorMessage).(types.RetryableExecutionError)
return nil, types.RetryableExecutionError(fmt.Sprintf("async query contained error: %s", errorMessage))
}
return nil, fmt.Errorf("async query contained error: %s", errorMessage)
}
Expand Down

0 comments on commit 4c44198

Please sign in to comment.