Error thrown (or rejected) by every ctx.user / bot.user() operation on invalid input or when user data is not available. Inspect code rather than the message.
ctx.user
bot.user()
code
try { await ctx.user.set('a..b', 1) }catch (error) { if (error instanceof UserDataError && error.code === 'INVALID_PATH') { ... }} Copy
try { await ctx.user.set('a..b', 1) }catch (error) { if (error instanceof UserDataError && error.code === 'INVALID_PATH') { ... }}
Optional
Readonly
Error thrown (or rejected) by every
ctx.user/bot.user()operation on invalid input or when user data is not available. Inspectcoderather than the message.Example