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

Subclass the Error object #1274

Merged
merged 1 commit into from
Nov 21, 2017
Merged

Subclass the Error object #1274

merged 1 commit into from
Nov 21, 2017

Conversation

Martii
Copy link
Member

@Martii Martii commented Nov 21, 2017

  • Some reworking of graceful failures to indicate what they are
  • This probably should have been done around the time statusCodePage was implemented with ES5 compatible inheritance. May move this routine to debug.js
  • One comment BUG fixed
  • These trapped errors are throwable if we choose

NOTES:

  • Almost named the inherited Error Object as userError since that's what most of these end up being. ;)
  • NOT tested yet with the webhook... have to merge first. GitHub doesn't seem to show the statusMessage so might be out of luck here. 400 is User Error 500 is Server Error (usually... have a few Watchpoints to figure out if they are the correct code)
  • This is pass number 1 ... optimizing/tweaking will come later after this testing and additional respite... including some possible status code changes

Applies to #37

* Some reworking of graceful failures to indicate what they are
* This probably should have been done around the time `statusCodePage` was implemented with ES5 compatible inheritance. May move this routine to debug.js
* One comment BUG fixed
* These trapped errors are `throw`able if we choose

NOTES:
* Almost named the inherited `Error` Object as `userError` since that's what most of these end up being. ;)
* **NOT** tested yet with the webhook... have to merge first. GitHub doesn't seem to show the statusMessage so might be out of luck here. 400 is User Error 500 is Server Error *(usually... have a few Watchpoints to figure out if they are the correct code)*
* This is pass number 1 ... optimizing/tweaking will come later after this testing and additional respite... including some possible status code changes

Applies to OpenUserJS#37
@Martii Martii added bug You've guessed it... this means a bug is reported. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface. labels Nov 21, 2017
@Martii Martii merged commit 19855f9 into OpenUserJS:master Nov 21, 2017
@Martii Martii deleted the subclassError branch November 21, 2017 02:43
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Nov 28, 2017
* Some Code condensing in the process as a result

NOTES:
* Some of the errors returned may still be strings instead of an Error *(subclassed or not)* so add default conditional for that. Usually those are 400 user errors but could be 500 server error... unknown at this time.

Post OpenUserJS#1284 OpenUserJS#1289 and OpenUserJS#1274 OpenUserJS#37
Martii added a commit that referenced this pull request Nov 28, 2017
* Some Code condensing in the process as a result

NOTES:
* Some of the errors returned may still be strings instead of an Error *(subclassed or not)* so add default conditional for that. Usually those are 400 user errors but could be 500 server error... unknown at this time.

Post #1284 #1289 and #1274 #37

Auto-merge
Martii added a commit to Martii/OpenUserJS.org that referenced this pull request Dec 5, 2017
* Bug fix on helper
* Automate rejection of an occasional issue with excessive dimensions

Post OpenUserJS#1283 OpenUserJS#1274
@Martii Martii mentioned this pull request Dec 5, 2017
Martii added a commit that referenced this pull request Dec 5, 2017
* Bug fix on helper
* Automate rejection of an occasional issue with excessive dimensions

Post #1283 #1274

Auto-merge
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug You've guessed it... this means a bug is reported. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface.
Development

Successfully merging this pull request may close these issues.

1 participant