File tree Expand file tree Collapse file tree
compat/v0_3/client/transports/grpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ export class LegacyGrpcTransport implements Transport {
326326 options . signal . removeEventListener ( 'abort' , onAbort ) ;
327327 }
328328 if ( error ) {
329- return reject ( LegacyGrpcTransport . _mapToError ( error , method ) ) ;
329+ return reject ( fromGrpcError ( error , method ) ) ;
330330 }
331331 try {
332332 resolve ( converter ( response ) ) ;
@@ -371,7 +371,7 @@ export class LegacyGrpcTransport implements Transport {
371371 }
372372 } catch ( error ) {
373373 if ( LegacyGrpcTransport . _isServiceError ( error ) ) {
374- throw LegacyGrpcTransport . _mapToError ( error , method ) ;
374+ throw fromGrpcError ( error , method ) ;
375375 }
376376 throw new Error ( `GRPC error for ${ String ( method ) } !` , { cause : error } ) ;
377377 } finally {
@@ -414,13 +414,4 @@ export class LegacyGrpcTransport implements Transport {
414414 } ;
415415 return toCoreStreamResponse ( envelope ) ;
416416 }
417-
418- /**
419- * Decodes `google.rpc.ErrorInfo` from `grpc-status-details-bin` when
420- * present (this SDK's `legacyGrpcService` emits it); otherwise returns
421- * `GrpcGenericError` preserving the gRPC code and details.
422- */
423- private static _mapToError ( error : grpc . ServiceError , method ?: string ) : Error {
424- return fromGrpcError ( error , method ) ;
425- }
426417}
Original file line number Diff line number Diff line change @@ -36,5 +36,5 @@ export {
3636
3737// Transport-agnostic error hierarchy: base class, semantic subclasses,
3838// per-transport variants (Rest*/Grpc*/JsonRpc*), and `is*Error` type
39- // guards. Also re-exported from `./client` and `./server`.
39+ // guards.
4040export * from './errors/index.js' ;
You can’t perform that action at this time.
0 commit comments