Uh oh!
There was an error while loading. Please reload this page.
Migrating Custom Transports to latest (7.x) SDK version #7112
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello people, We are trying to upgrade our self-hosted Sentry server and clients to latest versions. which makes the Now I am not sure what we should pass to that argument, and I cannot seem to find any related documentation. Any help would be appreciated, |
Replies: 1 comment 5 replies
Hey @ktsangop - you shouldn't need to access those internal base transport options. Something like so should suffice: /** * Creates a Custom transport. */exportfunctionmakeCustomTransport(options: BrowserTransportOptions,): Transport{asyncfunctionmakeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse>{try{constresponse=awaitmakeARequestFromUrl(options.url,request.body);// the `statusCode` and the two rate limiting headers consttransportResponse={statusCode: response.status,headers: {'x-sentry-rate-limits': response.header['X-Sentry-Rate-Limits'],'retry-after': response.headers['Retry-After'],},};returnPromise.resolve(transportResponse)}catch(e){clearCachedFetchImplementation();returnrejectedSyncPromise(e);}}returncreateTransport(options,makeRequest);} |
Hey @ktsangop - you shouldn't need to access those internal base transport options.
Something like so should suffice: