{"record":{"id":"35f7323bfa658ac0","repo":"hcengineering/platform","slug":"process-error-userrequestedvaluenotprovided","errorCode":"process.error.UserRequestedValueNotProvided","errorMessage":"User requested value not provided: {attr}","messagePattern":"User requested value not provided: (.+?)","errorType":"exception","errorClass":"ProcessError","httpStatus":null,"severity":"error","filePath":"server-plugins/process-resources/src/utils.ts","lineNumber":282,"sourceCode":"    const funcImpl = control.client.getHierarchy().as(transform, serverProcess.mixin.FuncImpl)\n    const f = await getResource(funcImpl.func)\n    const val = await f(res, {}, control, execution)\n    if (val == null && context.func !== process.function.EmptyValue) {\n      throw processError(process.error.EmptyFunctionResult, {}, { func: func.label })\n    }\n    return val\n  }\n  if (res == null && context.func !== process.function.EmptyValue) {\n    throw processError(process.error.EmptyFunctionResult, {}, { func: func.label })\n  }\n  return res\n}\n\nfunction getUserRequestValue (control: ProcessControl, execution: Execution, context: SelectedUserRequest): any {\n  const userContext = execution.context[context.id]\n  if (userContext !== undefined) return userContext\n  const attr = control.client.getHierarchy().findAttribute(context._class, context.key)\n  throw processError(\n    process.error.UserRequestedValueNotProvided,\n    {},\n    { attr: attr?.label ?? getEmbeddedLabel(context.key) }\n  )\n}\n\nasync function getExecutionContextValue (\n  control: ProcessControl,\n  execution: Execution,\n  context: SelectedExecutionContext\n): Promise<any> {\n  const userContext = execution.context[context.id]\n  const _process = control.client.getModel().findObject(execution.process)\n  const processContext = _process?.context?.[context.id]\n  if (userContext !== undefined) {\n    if (context.key == null || context.key === '' || context.key === '_id') return userContext\n    if (processContext !== undefined) {\n      const contextVal =","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/server-plugins/process-resources/src/utils.ts#L264-L300","documentation":"getUserRequestValue looks up the value the user was supposed to supply in execution.context[context.id]; if absent, it throws UserRequestedValueNotProvided naming the attribute label. The process paused for user input that never arrived.","triggerScenarios":"execution.context lacks an entry for context.id when the user-request context is evaluated — user skipped a form step, the answer was never stored back into execution.context, or the id key mismatches.","commonSituations":"Client UI not persisting the user's answer under the expected context id; process resumed programmatically without injecting the requested value; id mismatch between the request step and the resume call.","solutions":["Ensure the client writes the user's answer to execution.context[context.id] before resuming the process","Verify the context id used when resuming matches the SelectedUserRequest id","Validate required user inputs in the UI before completing the step","Catch the error and re-prompt the user for the missing attribute"],"exampleFix":"// before\nawait process.resume(executionId) // user answer never stored\n// after\nawait process.resume(executionId, { context: { [requestContext.id]: userInput } })","handlingStrategy":"validation","validationCode":"if (execution.context[requestContext.id] === undefined) {\n  throw new Error(`user input for ${requestContext.key} is required before resuming`)\n}","typeGuard":null,"tryCatchPattern":"try {\n  val = await getContextValue(control, execution, context)\n} catch (e) {\n  if (e?.code === 'process.error.UserRequestedValueNotProvided') {\n    return promptUserFor(e.params?.attr) // re-prompt instead of failing\n  }\n  throw e\n}","preventionTips":["Always write user answers into execution.context under the requested id before resuming","Mark user-request steps as required in the UI","Keep request ids in constants shared between requester and resolver"],"tags":["process","user-input","missing-value"],"backgroundTag":"missing-user-input","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}