is this state incorrect? Integration Def ```ts ...
# đź’»developers
f
is this state incorrect? Integration Def
Copy code
ts
  states: {
    supabaseCredentials: {
      type: "user",
      schema: z.object({
        userId: z.string(),
        access_token: z.string(),
        refresh_token: z.string(),
      }),
    },
  },
and using it like
Copy code
ts
      await client.setState({
          name: "supabaseCredentials",
          payload: {
            access_token,
            refresh_token,
            userId,
          },
          id: ctx.botUserId,
          type: "user",
        });
BP complains
State "supabaseCredentials" doesn't exist for user "764e2230-1e65-4181-a019-6874a982520d" (Error ID: err_1692395938798xB4AE3A54)