onetimesecret/onetimesecret · error · Error

Unable to update customer data. Please try again.

Error message

Unable to update customer data. Please try again.

What it means

Error "Unable to update customer data. Please try again." thrown in onetimesecret/onetimesecret.

Source

Thrown at src/shared/stores/customerStore.ts:108

  /**
   * Updates the current customer's data with the provided updates.
   * @param updates - Partial customer data to update.
   * @throws Will handle and set any errors encountered during the API call.
   */
  async function updateCustomer(updates: Partial<Customer>) {
    if (!currentCustomer.value?.objid) {
      // Use handleError instead of throwing directly
      throw createError('No current customer to update', 'human', 'error');
    }

    const response = await $api.put(
      `/api/account/customer/${currentCustomer?.value?.objid}`,
      updates
    );
    const result = gracefulParse(responseSchemas.customer, response.data, 'CustomerResponse');
    if (!result.ok) {
      throw new Error('Unable to update customer data. Please try again.');
    }
    currentCustomer.value = result.data.record as Customer;
  }

  /**
   * Resets the store state to its initial values.
   */
  function $reset() {
    currentCustomer.value = null;
    abortController.value = null;
    _initialized.value = false;
  }

  return {
    // State
    init,
    currentCustomer,
    abortController,

View on GitHub (pinned to f81295e41b)

Solutions

  1. Validate the submitted customer fields, then retry the update.
  2. Check server logs for validation or persistence errors if it keeps failing.

When it happens

Trigger: Thrown at src/shared/stores/customerStore.ts:108 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of onetimesecret/onetimesecret@f81295e41b (2026-08-23). Data as JSON: /api/errors/d37a24a166dc0aff. Report an issue: GitHub.