Returning error and avoiding any outer reference

pull/5501/head
Leo Giovanetti 2022-11-16 17:11:14 -03:00
parent eaae772abc
commit 7d32e30154
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
data, data,
}); });
} catch (reason) { } catch (reason) {
logger.error("Could not add Sendgrid app", reason); return { error: true };
} }
return { url: "/apps/installed/other?hl=sendgrid" }; return { url: "/apps/installed/other?hl=sendgrid" };

View File

@ -20,10 +20,10 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
if (usernameInfo.username) { if (usernameInfo.username) {
return {}; return {};
} else { } else {
logger.error("Could not check Sendgrid app API key"); return { error: true };
} }
} catch (e) { } catch (e) {
logger.error("Could not check Sendgrid app API key", e); return { error: true };
} }
} }