@temporalio/client
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,2 @@ | ||
import { status as grpcStatus } from '@grpc/grpc-js'; | ||
import { DataConverter, LoadedDataConverter } from '@temporalio/common'; | ||
@@ -307,2 +308,7 @@ import { BaseWorkflowHandle, QueryDefinition, Replace, WithWorkflowArgs, Workflow, WorkflowResultType } from '@temporalio/internal-workflow-common'; | ||
} | ||
export declare class QueryNotRegisteredError extends Error { | ||
readonly code: grpcStatus; | ||
readonly name: string; | ||
constructor(message: string, code: grpcStatus); | ||
} | ||
export {}; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.QueryRejectedError = exports.WorkflowClient = exports.defaultWorkflowClientOptions = void 0; | ||
exports.QueryNotRegisteredError = exports.QueryRejectedError = exports.WorkflowClient = exports.defaultWorkflowClientOptions = void 0; | ||
const grpc_js_1 = require("@grpc/grpc-js"); | ||
@@ -295,2 +295,5 @@ const common_1 = require("@temporalio/common"); | ||
catch (err) { | ||
if ((0, errors_1.isServerErrorResponse)(err) && err.code === grpc_js_1.status.INVALID_ARGUMENT) { | ||
throw new QueryNotRegisteredError(err.message.replace(/^3 INVALID_ARGUMENT: /, ''), err.code); | ||
} | ||
this.rethrowGrpcError(err, input.workflowExecution, 'Failed to query Workflow'); | ||
@@ -598,2 +601,10 @@ } | ||
exports.QueryRejectedError = QueryRejectedError; | ||
class QueryNotRegisteredError extends Error { | ||
constructor(message, code) { | ||
super(message); | ||
this.code = code; | ||
this.name = 'QueryNotRegisteredError'; | ||
} | ||
} | ||
exports.QueryNotRegisteredError = QueryNotRegisteredError; | ||
function workflowStatusCodeToName(code) { | ||
@@ -600,0 +611,0 @@ return workflowStatusCodeToNameInternal(code) ?? 'UNKNOWN'; |
{ | ||
"name": "@temporalio/client", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Temporal.io SDK Client sub-package", | ||
@@ -17,8 +17,8 @@ "main": "lib/index.js", | ||
"@grpc/grpc-js": "^1.6.7", | ||
"@temporalio/common": "^1.0.0", | ||
"@temporalio/internal-non-workflow-common": "^1.0.0", | ||
"@temporalio/internal-workflow-common": "^1.0.0", | ||
"@temporalio/proto": "^1.0.0", | ||
"@temporalio/common": "^1.0.1", | ||
"@temporalio/internal-non-workflow-common": "^1.0.1", | ||
"@temporalio/internal-workflow-common": "^1.0.1", | ||
"@temporalio/proto": "^1.0.1", | ||
"ms": "^2.1.3", | ||
"protobufjs": "6.11.2", | ||
"protobufjs": "^7.0.0", | ||
"uuid": "^8.3.2" | ||
@@ -37,3 +37,3 @@ }, | ||
], | ||
"gitHead": "c4fc4dc608bf58701c11b6ae02d1d63b4457718d" | ||
"gitHead": "a1dae539e72b6b088b400998d7bef482e8ed52f1" | ||
} |
@@ -614,2 +614,5 @@ import { status as grpcStatus } from '@grpc/grpc-js'; | ||
} catch (err) { | ||
if (isServerErrorResponse(err) && err.code === grpcStatus.INVALID_ARGUMENT) { | ||
throw new QueryNotRegisteredError(err.message.replace(/^3 INVALID_ARGUMENT: /, ''), err.code); | ||
} | ||
this.rethrowGrpcError(err, input.workflowExecution, 'Failed to query Workflow'); | ||
@@ -942,2 +945,9 @@ } | ||
export class QueryNotRegisteredError extends Error { | ||
public readonly name: string = 'QueryNotRegisteredError'; | ||
constructor(message: string, public readonly code: grpcStatus) { | ||
super(message); | ||
} | ||
} | ||
function workflowStatusCodeToName(code: temporal.api.enums.v1.WorkflowExecutionStatus): WorkflowExecutionStatusName { | ||
@@ -944,0 +954,0 @@ return workflowStatusCodeToNameInternal(code) ?? 'UNKNOWN'; |
Sorry, the diff of this file is not supported yet
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
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
211284
4256
- Removed@types/long@4.0.2(transitive)
- Removedlong@4.0.0(transitive)
- Removedprotobufjs@6.11.2(transitive)
Updated@temporalio/common@^1.0.1
Updated@temporalio/proto@^1.0.1
Updatedprotobufjs@^7.0.0