livepeer / livepeer/task-runner
Switch to a more robust solution that string matching for Catalyst error humanization
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/livepeer/task-runner/pull/101 and https://github.com/livepeer/task-runner/pull/104 implemented humanized errors for certain internal errors. But, the approach is pretty fragile as it is based on string matching so if the error messages downstream change the logic here could break. We should consider a better way to categorize and transform these internal errors into humanized versions. For example, if there are special error types we could check if an error is of that type and determine the humanized error message to return i.e. ErrInaccessibleFile -> "file could not be accessed" and ErrInaccessibleFile could be used to wrap different error messages i.e. 504 Gateway Timeout, giving up after X attempts, etc.
This is scoped for Catalyst error humanization, but the approach here might be useful for other forms of error humanization as well.
Additionally, the string matching approach exposes task-runner to the internal details of Catalyst (i.e. MediaConvert). A better approach would hide those implementation details from task-runner.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull requests 101 and 104 to locate the current Catalyst error humanization and its string matching. Define how internal errors such as ErrInaccessibleFile should be categorized without exposing downstream implementation details, then verify that the resulting humanized messages remain stable across the listed underlying error messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100