fix(auth): ensure error message is properly converted to string in API key validation

This commit is contained in:
Mauricio Siu
2026-02-18 11:23:31 -06:00
parent 713aa5fd58
commit a83a742bf3

View File

@@ -361,7 +361,7 @@ export const validateRequest = async (request: IncomingMessage) => {
});
if (error) {
throw new Error(error.message || "Error verifying API key");
throw new Error(error.message?.toString() || "Error verifying API key");
}
if (!valid || !key) {
return {