Caleb: solve for typechecking on idempotencyKey on my machine
This commit is contained in:
parent
32dde257a5
commit
5a91d8425f
@ -10,10 +10,12 @@ export async function validateIdempotencyKey(
|
|||||||
// // not returning for missing idempotency key for now
|
// // not returning for missing idempotency key for now
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!isUuid(idempotencyKey)) {
|
// Ensure idempotencyKey is treated as a string
|
||||||
console.error("Invalid idempotency key provided in the request headers.");
|
const key = Array.isArray(idempotencyKey) ? idempotencyKey[0] : idempotencyKey;
|
||||||
return false;
|
if (!isUuid(key)) {
|
||||||
}
|
console.error("Invalid idempotency key provided in the request headers.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const { data, error } = await supabase_service
|
const { data, error } = await supabase_service
|
||||||
.from("idempotency_keys")
|
.from("idempotency_keys")
|
||||||
|
Loading…
Reference in New Issue
Block a user