-
Notifications
You must be signed in to change notification settings - Fork 2
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
task/runner: Handle extra import request errs when humanizing #104
Conversation
Codecov Report
@@ Coverage Diff @@
## main #104 +/- ##
=================================================
- Coverage 5.45262% 5.38421% -0.06841%
=================================================
Files 14 14
Lines 1889 1913 +24
=================================================
Hits 103 103
- Misses 1777 1801 +24
Partials 9 9
Continue to review full report at Codecov.
|
@@ -475,9 +475,19 @@ func errorInfo(err error) *data.ErrorInfo { | |||
func humanizeCatalystError(err error) error { | |||
errMsg := strings.ToLower(err.Error()) | |||
|
|||
fileNotAccessibleErrs := []string{ | |||
"504 Gateway Timeout", |
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.
This needs to be lower case as well
// General errors | ||
if strings.Contains(errMsg, "import request") && strings.Contains(errMsg, "504 Gateway Timeout") { | ||
return errors.New("file could not be imported from URL because it was not accessible") | ||
// TODO(yondonfu): This string matching is ugly and we should come up with a better less error-prone way to |
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.
Agreed. We should probably work with error codes like mediaconvert does (but may always have some string parsing fallback anyway, just hopefully won't be the main logic)
Fixes #103