{"record":{"id":"d37a24a166dc0aff","repo":"onetimesecret/onetimesecret","slug":"unable-to-update-customer-data-please-try-again","errorCode":null,"errorMessage":"Unable to update customer data. Please try again.","messagePattern":"Unable to update customer data\\. Please try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/shared/stores/customerStore.ts","lineNumber":108,"sourceCode":"\n  /**\n   * Updates the current customer's data with the provided updates.\n   * @param updates - Partial customer data to update.\n   * @throws Will handle and set any errors encountered during the API call.\n   */\n  async function updateCustomer(updates: Partial<Customer>) {\n    if (!currentCustomer.value?.objid) {\n      // Use handleError instead of throwing directly\n      throw createError('No current customer to update', 'human', 'error');\n    }\n\n    const response = await $api.put(\n      `/api/account/customer/${currentCustomer?.value?.objid}`,\n      updates\n    );\n    const result = gracefulParse(responseSchemas.customer, response.data, 'CustomerResponse');\n    if (!result.ok) {\n      throw new Error('Unable to update customer data. Please try again.');\n    }\n    currentCustomer.value = result.data.record as Customer;\n  }\n\n  /**\n   * Resets the store state to its initial values.\n   */\n  function $reset() {\n    currentCustomer.value = null;\n    abortController.value = null;\n    _initialized.value = false;\n  }\n\n  return {\n    // State\n    init,\n    currentCustomer,\n    abortController,","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/onetimesecret/onetimesecret/blob/f81295e41bc3e808a3dd2cbea03ef65401a662e4/src/shared/stores/customerStore.ts#L90-L126","documentation":"Error \"Unable to update customer data. Please try again.\" thrown in onetimesecret/onetimesecret.","triggerScenarios":"Thrown at src/shared/stores/customerStore.ts:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the submitted customer fields, then retry the update.","Check server logs for validation or persistence errors if it keeps failing."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f81295e41bc3e808a3dd2cbea03ef65401a662e4","analyzedAt":"2026-08-23T21:13:10.635Z","schemaVersion":2},"datasetVersion":"2026-08-24T02:17:37.098Z"}