Closed seeratawan01 closed 1 month ago
๐ Score: 92 |
๐งช No relevant tests |
๐ No security concerns identified |
โก No key issues to review |
relevant file | packages/javascript-sdk/src/usermaven.ts |
suggestion | Consider adding error handling specifically for the `keepalive` option in the fetch request. Since `keepalive` requests have limitations like size constraints and no CORS redirects, it's important to handle cases where the request might fail due to these limitations. This can be done by checking the response status and logging an appropriate error message. [important] |
relevant line | keepalive: true, |
Category | Suggestion | Score |
Enhancement |
Conditionally set the
___
**Ensure that the | 8 |
PR Type
enhancement, bug fix
Description
keepalive: true
option to the fetch request in theusermaven.ts
file to ensure data is sent during unload events.Changes walkthrough ๐
usermaven.ts
Add keepalive option to fetch request for unload events
packages/javascript-sdk/src/usermaven.ts
keepalive: true
to the fetch request options.