We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bbe208 commit a569068Copy full SHA for a569068
README.md
@@ -82,3 +82,14 @@ const datasource = new (class MoviesAPI extends HTTPDataSource {
82
// cancel all running requests e.g when request is closed prematurely
83
datasource.abort()
84
```
85
+
86
+## Hooks
87
88
+- `onCacheKeyCalculation` - Returns the cache key for request memoization.
89
+- `onRequestError` - Is executed only for request errors.
90
+- `beforeRequest` - Is executed before a request is executed.
91
+- `onResponse` - Is executed on a successful response.
92
93
+## Error handling
94
95
+The http client throws for unsuccessful responses. Every error is rethrown to the caller. You can use the `onRequestError` hook to log request errors.
0 commit comments