mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-15 01:55:53 +08:00
fix(auth): fix error reporting
This commit is contained in:
parent
7d9f5bf8b1
commit
670d253a8c
@ -61,8 +61,10 @@ async function getKeyAndPriceId(normalizedApi: string): Promise<{
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (!data || data.length === 0) {
|
if (!data || data.length === 0) {
|
||||||
Logger.warn(`Error fetching api key: ${error.message} or data is empty`);
|
if (error) {
|
||||||
Sentry.captureException(error);
|
Logger.warn(`Error fetching api key: ${error.message} or data is empty`);
|
||||||
|
Sentry.captureException(error);
|
||||||
|
}
|
||||||
// TODO: change this error code ?
|
// TODO: change this error code ?
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
@ -309,8 +311,8 @@ export async function supaAuthenticateUser(
|
|||||||
if (error || !data || data.length === 0) {
|
if (error || !data || data.length === 0) {
|
||||||
if (error) {
|
if (error) {
|
||||||
Sentry.captureException(error);
|
Sentry.captureException(error);
|
||||||
|
Logger.warn(`Error fetching api key: ${error.message} or data is empty`);
|
||||||
}
|
}
|
||||||
Logger.warn(`Error fetching api key: ${error.message} or data is empty`);
|
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
error: "Unauthorized: Invalid token",
|
error: "Unauthorized: Invalid token",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user