@grpc/grpc-js
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -171,20 +171,20 @@ "use strict"; | ||
stream.on('response', (headers, flags) => { | ||
switch (headers[HTTP2_HEADER_STATUS]) { | ||
switch (headers[':status']) { | ||
// TODO(murgatroid99): handle 100 and 101 | ||
case '400': | ||
case 400: | ||
this.mappedStatusCode = constants_1.Status.INTERNAL; | ||
break; | ||
case '401': | ||
case 401: | ||
this.mappedStatusCode = constants_1.Status.UNAUTHENTICATED; | ||
break; | ||
case '403': | ||
case 403: | ||
this.mappedStatusCode = constants_1.Status.PERMISSION_DENIED; | ||
break; | ||
case '404': | ||
case 404: | ||
this.mappedStatusCode = constants_1.Status.UNIMPLEMENTED; | ||
break; | ||
case '429': | ||
case '502': | ||
case '503': | ||
case '504': | ||
case 429: | ||
case 502: | ||
case 503: | ||
case 504: | ||
this.mappedStatusCode = constants_1.Status.UNAVAILABLE; | ||
@@ -191,0 +191,0 @@ break; |
@@ -87,7 +87,2 @@ "use strict"; | ||
}); | ||
call.on('end', () => { | ||
if (responseMessage == null) { | ||
call.cancelWithStatus(constants_1.Status.INTERNAL, 'Not enough responses received'); | ||
} | ||
}); | ||
call.on('status', (status) => { | ||
@@ -94,0 +89,0 @@ /* We assume that call emits status after it emits end, and that it |
{ | ||
"name": "@grpc/grpc-js", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "gRPC Library for Node - pure JS implementation", | ||
@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
212687
63
5074
8