fix: handle 204 No Content responses in base adapter

This commit is contained in:
Justin Edmund 2025-11-30 02:31:37 -08:00
parent 2275daec61
commit f346a73b61

View file

@ -171,6 +171,11 @@ export abstract class BaseAdapter {
// Make the request with retry logic (errors handled inside fetchWithRetry)
const response = await this.fetchWithRetry(url, fetchOptions, options.retries)
// Handle 204 No Content responses (e.g., DELETE operations)
if (response.status === 204) {
return undefined as T
}
// Parse and transform the response
const data = await response.json()