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

Re-input catch statements in updater logic #442

Closed
NotExpectedYet opened this issue Apr 22, 2021 · 1 comment
Closed

Re-input catch statements in updater logic #442

NotExpectedYet opened this issue Apr 22, 2021 · 1 comment
Assignees
Labels
bug Something isn't working / good issue report fixed on dev This issue has been fixed and is on its way

Comments

@NotExpectedYet
Copy link
Member

I believe I incorrectly removed the stderr catch statements from the upgrade logic, if those failed for whatever reason they would just crash out the system so I will add them back in and do some further testing with that and get a PR ready if that's the case.

@NotExpectedYet NotExpectedYet added the bug Something isn't working / good issue report label Apr 22, 2021
@NotExpectedYet NotExpectedYet added this to To do in 1.1.13 - Pushup Party via automation Apr 22, 2021
@davidzwa
Copy link
Contributor

davidzwa commented Apr 22, 2021

I would suggest in that case to catch specific errors + catch-all and grab out the right message to propagate to the UI. That will make sure that the expected errors are humanized. If we dont, then try-catching is pretty much the same as having a 500 error code: the user wont understand what is going on.

https://stackoverflow.com/questions/1433558/handling-specific-errors-in-javascript-think-exceptions#:~:text=Using%20try%2Dcatch%2Dfinally.,call%20to%20execute%20either%20way.

// ...
try {
  throwSpecificError();
} catch (e) {
  if (e.name == 'SpecificError') {
   // specific error
  } else {
    throw e; // let others bubble up
  }
}

@NotExpectedYet NotExpectedYet moved this from To do to In progress in 1.1.13 - Pushup Party Apr 23, 2021
@NotExpectedYet NotExpectedYet moved this from In progress to Done in 1.1.13 - Pushup Party Apr 23, 2021
@NotExpectedYet NotExpectedYet added the fixed on dev This issue has been fixed and is on its way label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working / good issue report fixed on dev This issue has been fixed and is on its way
Projects
No open projects
Development

No branches or pull requests

2 participants