Skip to content

Commit 6fee781

Browse files
committed
addressed comments
1 parent 26962e4 commit 6fee781

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/io/cdap/plugin/gcp/common/GCPErrorDetailsProviderUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ public static ErrorUtils.ActionErrorPair getActionErrorByGrpcStatusCode(int grpc
169169

170170
public static ProgramFailureException getProgramFailureExceptionByGrpcStatusCode(int grpcErrorCodeValue,
171171
String grpcErrorReason, String grpcErrorMessage, String supportedDocUrl, Exception se) {
172-
int httpStatusCode = GCPErrorDetailsProviderUtil.GCP_GRPC_ERROR_CODE_HTTP_STATUS_CODE_MAP.get(grpcErrorCodeValue);
172+
int httpStatusCode = GCPErrorDetailsProviderUtil.GCP_GRPC_ERROR_CODE_HTTP_STATUS_CODE_MAP.
173+
getOrDefault(grpcErrorCodeValue, 500);
173174
ErrorUtils.ActionErrorPair actionErrorPair = GCPErrorDetailsProviderUtil.getActionErrorByGrpcStatusCode(
174175
grpcErrorCodeValue);
175176
String errorReason = grpcErrorReason;
@@ -187,5 +188,4 @@ public static ProgramFailureException getProgramFailureExceptionByGrpcStatusCode
187188
actionErrorPair != null ? actionErrorPair.getErrorType() : ErrorType.UNKNOWN, true, ErrorCodeType.HTTP,
188189
String.valueOf(httpStatusCode), supportedDocUrl, se);
189190
}
190-
191191
}

0 commit comments

Comments
 (0)