You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the [main module documentation](https://pursuit.purescript.org/packages/purescript-affjax/docs/Affjax) for a full list of these helpers and their variations.
66
67
67
-
## Error handling
68
-
69
-
There are two ways an Affjax request can fail: there's either some problem with the request itself, or the result that comes back is not as expected.
70
-
71
-
For the first case, these errors will be things like the URL being invalid or the server not existing, and will occur in the `Aff` error channel. The [`try`](https://pursuit.purescript.org/packages/purescript-aff/docs/Effect.Aff#v:try) function can lift these errors out of the error channel so the result of a request becomes `Aff (Either Error (Response _))`.
72
-
73
-
The latter case occurs when we did get a response for the request, but the result that came back could not be handled in the way that was expected. In these situations the `body` value of the `Response` will be a `Left` value with the error message describing what went wrong.
74
-
75
68
## Module documentation
76
69
77
70
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-affjax).
0 commit comments