Skip to content
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

Switch to a more robust solution that string matching for Catalyst error humanization #105

Open
yondonfu opened this issue Dec 14, 2022 · 0 comments

Comments

@yondonfu
Copy link
Member

yondonfu commented Dec 14, 2022

#101 and #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant