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

Feat/cor 32 requests made through client never error #57

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

LukeT-Amplience
Copy link
Contributor

@LukeT-Amplience LukeT-Amplience commented Jan 24, 2022

Adds wrapper method to request() throwing an error when requests fail.

@@ -88,4 +89,20 @@ export class HttpClient {
return this.DEFAULT_ERROR;
}
}

public async fetch(config: HttpRequest): Promise<HttpResponse> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, would be good to get some basic docs down as well.

also DEFAULT_ERROR shows the shape of errors we normally return from API errors. unsure if we need to follow that shape here but looks good!

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.

2 participants