I want to use aws amplify for fetching data. So i was thinking to create a custom hooks. So far it's working fine but onError dosen't work as intended #5113
Answered
by
TkDodo
Parthvsquare
asked this question in
Q&A
-
Is it possible to use aws amplify instead of axios? (we have cognito pool, so different pools will get different data)
(edited comment for formatting issue)
So far i was able to create this custom hook but i can figure out the error partthis is how i use this hook.
|
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Mar 11, 2023
Replies: 1 comment 1 reply
-
you're not returning a rejected promise from the function because this transforms it into a resolved promise:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Parthvsquare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you're not returning a rejected promise from the function because this transforms it into a resolved promise: