Skip to content

Commit

Permalink
feat: add public method to get gRPC status code (#25)
Browse files Browse the repository at this point in the history
Fixes #14.
  • Loading branch information
olavloite committed Jan 10, 2020
1 parent 93c0aed commit 2dbe3cf
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -69,6 +69,11 @@ Status getGrpcStatus() {
return this.code.toStatus();
}

/** @return the corresponding gRPC status code of this {@link ErrorCode}. */
public Status.Code getGrpcStatusCode() {
return this.code;
}

/**
* Returns the error code represents by {@code name}, or {@code defaultValue} if {@code name} does
* not map to a known code.
Expand Down

0 comments on commit 2dbe3cf

Please sign in to comment.