When whitelisting a user on Radar through the https://api.workos.com/radar/lists/email/allow endpoint, the response is 204 No Content. However, the SDK expects a message and throws an error because one is not found.
Error:
Failed to whitelist user in WorkOS Radar 2858 | control: response.control,
2859 | blocklistType: response.blocklist_type
2860 | });
2861 | //#endregion
2862 | //#region src/radar/serializers/radar-list-entry-already-present-response.serializer.ts
2863 | const deserializeRadarListEntryAlreadyPresentResponse = (response) => ({ message: response.message });
^
TypeError: null is not an object (evaluating 'response.message')
at deserializeRadarListEntryAlreadyPresentResponse (sisyphus/node_modules/@workos-inc/node/lib/factory-BjWO1KkE.mjs:2863:83)
Relevant function. Caller.
Example Response:
FetchHttpClientResponse {
_statusCode: 204,
_headers: {},
_res: Response (0 KB) {
ok: true,
url: "https://api.workos.com/radar/lists/email/allow",
status: 204,
statusText: "No Content",
headers: Headers {
"x-request-id": "58589017-2606-4183-b25b-2061a34fb50a",
},
redirected: false,
bodyUsed: false,
Blob (0 KB)
},
getRawResponse: [Function: getRawResponse],
toJSON: [AsyncFunction: toJSON],
getStatusCode: [Function: getStatusCode],
getHeaders: [Function: getHeaders],
}
When whitelisting a user on Radar through the
https://api.workos.com/radar/lists/email/allowendpoint, the response is204 No Content. However, the SDK expects amessageand throws an error because one is not found.Error:
Relevant function. Caller.
Example Response: