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

await butter.page.retrieve doesn't provide error status code on Error #93

Closed
AlyonaSidarenka opened this issue Aug 5, 2024 · 3 comments

Comments

@AlyonaSidarenka
Copy link

when making butter.page.retrieve it is expected that error will have status code.

const fn = async () => {
  try {
    await butter.page.retrieve(type, slug, params);
  } catch (error) {}

Actual result: error type is string which is error message
Expected result: error.response.status is defined

@courcelan
Copy link
Contributor

Hello @AlyonaSidarenka, please take a look at the PR issued #94 and see if this meets your needs.

Thank you!

@AlyonaSidarenka
Copy link
Author

Hey, @courcelan, yes, this should fix the issue.

@ViolanteCodes
Copy link
Contributor

@AlyonaSidarenka This fix has been merged in :)

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

3 participants