ctx.user / bot.user() operation on
invalid input or when user data is not available. Inspect code rather than
the message.
Example
Extends
Error
Constructors
Constructor
Parameters
Returns
UserDataError
Overrides
Error.constructor
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Class exported by @botmesh/core.
ctx.user / bot.user() operation on
invalid input or when user data is not available. Inspect code rather than
the message.
try { await ctx.user.set('a..b', 1) }
catch (error) {
if (error instanceof UserDataError && error.code === 'INVALID_PATH') { ... }
}
Errornew UserDataError(
code,
message,
options?
): UserDataError;
| Parameter | Type |
|---|---|
code | UserDataErrorCode |
message | string |
options? | { cause?: unknown; } |
options.cause? | unknown |
UserDataError
Error.constructor
readonly code: UserDataErrorCode;