{"record":{"id":"688e12b4a3c20a22","repo":"apache/beam","slug":"unknown-artifact-type-msg-request-getartifact-artifact","errorCode":null,"errorMessage":"Unknown artifact type \" + msg.request.getArtifact.artifact!.typeUrn","messagePattern":"Unknown artifact type \" \\+ msg\\.request\\.getArtifact\\.artifact!\\.typeUrn","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/runners/artifacts.ts","lineNumber":174,"sourceCode":"                isLast: false,\n                response: {\n                  oneofKind: \"getArtifactResponse\",\n                  getArtifactResponse: { data: chunk },\n                },\n              });\n            }\n            call.requests.send({\n              stagingToken: stagingToken,\n              isLast: true,\n              response: {\n                oneofKind: \"getArtifactResponse\",\n                getArtifactResponse: { data: new Uint8Array() },\n              },\n            });\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown artifact type \" +\n                msg.request.getArtifact.artifact!.typeUrn,\n            );\n        }\n        break;\n\n      default:\n        throw new Error(\"Unknown request type \" + msg.request.oneofKind);\n    }\n  });\n\n  call.requests.send({\n    stagingToken: stagingToken,\n    isLast: false,\n    response: {\n      oneofKind: undefined,\n    },\n  });","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/runners/artifacts.ts#L156-L192","documentation":"In offerArtifacts, the handler switches on the artifact's typeUrn and only supports the known artifact type URNs (e.g. file/URL/embedded types). Any artifact whose typeUrn is unrecognized falls through to the default case and throws, because the handler cannot fetch or serve artifacts of an unknown type.","triggerScenarios":"A job offers an artifact whose typeUrn is not among the URNs handled by this TypeScript runner (e.g. a new artifact type like beam:artifact:type:npm:v1 added by a newer SDK, or a custom/typo'd URN).","commonSituations":"Version skew between the pipeline/job-service (which stages new artifact types) and an older TypeScript runner SDK; custom artifact types introduced by an extension; a typo in a manually constructed artifact descriptor.","solutions":["Upgrade the TypeScript SDK so the runner recognizes the artifact type URN being offered.","Align the pipeline-side staging so it only emits artifact types this runner supports (e.g. package deps as file artifacts).","Check for version skew between the job service and the SDK and pin compatible versions.","If it's a custom type, add a case for its URN in the switch to handle/serve it."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const KNOWN_URNS = ['beam:artifact:type:file:v1', 'beam:artifact:type:url:v1', 'beam:artifact:type:embedded:v1'];\nif (!KNOWN_URNS.includes(artifact.typeUrn)) console.warn('Unsupported artifact type:', artifact.typeUrn);","typeGuard":null,"tryCatchPattern":"try {\n  await offerArtifacts(stagingClient, token, artifacts);\n} catch (e) {\n  if ((e as Error).message.startsWith('Unknown artifact type')) {\n    // upgrade SDK or re-stage as a supported artifact type\n  } else throw e;\n}","preventionTips":["Keep the SDK and job service on compatible Beam versions.","Only emit artifact types the target runner recognizes.","Log artifact.typeUrn when staging so skew is visible early."],"tags":["artifacts","unsupported","version-skew","runner"],"backgroundTag":"unsupported-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}