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

Feature/server errors #46

Closed
wants to merge 3 commits into from
Closed

Feature/server errors #46

wants to merge 3 commits into from

Conversation

Jonesy
Copy link
Contributor

@Jonesy Jonesy commented Jan 27, 2022

Description

All failed API calls were returning error objects with no content from the response object. This PR removes all the extraneous nested Error objects. When errors are returned the async function will now throw an object with the following structure

interface ErrorObject extends Error {
  status: number;
  statusText: string;
}

Example output
image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (non-breaking change with enhancements to documentation)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@JohnathanBrammall
Copy link

Testing still needs to be done before merge.

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

Successfully merging this pull request may close these issues.

3 participants