Skip to content

Commit f8f0d48

Browse files
committed
Use correct type for grpc error code
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 9567303 commit f8f0d48

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ui/src/api/vizier-grpc-client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* SPDX-License-Identifier: Apache-2.0
1717
*/
1818

19-
import { ClientReadableStream } from 'grpc-web';
19+
import { ClientReadableStream, StatusCode } from 'grpc-web';
2020
import { compactDecrypt } from 'jose';
2121
import * as pako from 'pako';
2222
import { Observable, of, from } from 'rxjs';
@@ -31,7 +31,7 @@ import {
3131
} from 'app/types/generated/vizierapi_pb';
3232
import { VizierServiceClient } from 'app/types/generated/VizierapiServiceClientPb';
3333

34-
import { GRPCStatusCode, VizierQueryError } from './vizier';
34+
import { VizierQueryError } from './vizier';
3535
import { VizierTable } from './vizier-table';
3636

3737
const noop = () => {};
@@ -380,7 +380,7 @@ export class VizierGRPCClient {
380380
});
381381
call.on('error', (grpcError) => {
382382
let error: VizierQueryError;
383-
if (grpcError.code === GRPCStatusCode.Unavailable) {
383+
if (grpcError.code === StatusCode.UNAVAILABLE) {
384384
error = new VizierQueryError('unavailable', grpcError.message);
385385
} else {
386386
error = new VizierQueryError('server', grpcError.message);

0 commit comments

Comments
 (0)