Gettting random timeout and 503

js
const r = await $fetch("/api/register", {
method: "POST",
body: {
email: t.value,
password: a.value
}
});
js
const r = await $fetch("/api/register", {
method: "POST",
body: {
email: t.value,
password: a.value
}
});
i am using nuxt3 and d1 as the auth database when ever i am trying to register a new account at random times i am getting the limit excedded error can some one help me understand this as if i am missing something obvious and importent. api call code
route -> 'server/api/register
const { email, password } = await useValidatedBody(event, {
email: z.string().email(),
password: z.string().min(8).max(128),
});

try {
const user = await useAuth().createUser({
primaryKey: {
providerId: "email",
providerUserId: email,
password: password
},
attributes: {
email,
},
});
route -> 'server/api/register
const { email, password } = await useValidatedBody(event, {
email: z.string().email(),
password: z.string().min(8).max(128),
});

try {
const user = await useAuth().createUser({
primaryKey: {
providerId: "email",
providerUserId: email,
password: password
},
attributes: {
email,
},
});
This causing random 503 and most time of the times it's giving the error and only rare times it's working even tried by removing the validation thinking the validation is consuming computation time. Can someone help me on this.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server