The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received Date

[Better Auth]: Failed to create user TypeError: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Date at Array.forEach (<anonymous>) { code: 'ERR_INVALID_ARG_TYPE' } BetterAuth Error Details: Error name: BetterCallAPIError Error message: API Error: UNPROCESSABLE_ENTITY Failed to create user Error stack: [Error [BetterCallAPIError]: API Error: UNPROCESSABLE_ENTITY Failed to create user] { status: 'UNPROCESSABLE_ENTITY', headers: Headers {}, body: [Object], [cause]: [Object] } ⨯ unhandledRejection: [Error [BetterCallAPIError]: API Error: UNPROCESSABLE_ENTITY Failed to create user] { status: 'UNPROCESSABLE_ENTITY', headers: Headers {}, body: [Object], [cause]: [Object] } ⨯ unhandledRejection: [Error [BetterCallAPIError]: API Error: UNPROCESSABLE_ENTITY Failed to create user] { status: 'UNPROCESSABLE_ENTITY', headers: Headers {}, body: [Object], [cause]: [Object]
5 Replies
Ravi
RaviOP3w ago
Anyone know why or how this happens? const newUser = await auth.api.signUpEmail({ body: { email: individual.email, password: password, name: individual.firstName, } }); All timestamps are string mode btw in my schema
bekacru
bekacru3w ago
make them date
Ravi
RaviOP3w ago
ok lemme try
Ravi
RaviOP3w ago
like this?
No description
Ravi
RaviOP3w ago
or should i get rid of string mode altogether

Did you find this page helpful?