Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/handlers/retryHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ export const retryRequest = async (
try {
const response: Response = timeout
? await fetchWithTimeout(url, options, timeout)
: await fetch(url, options);
: await fetch(url, {
...options,
headers: {
...options.headers,
'User-Agent': 'Portkey Gateway/1.0',
},
});
if (statusCodesToRetry.includes(response.status)) {
const errorObj: any = new Error(await response.text());
errorObj.status = response.status;
Expand Down
Loading