Returning error and avoiding any outer reference
parent
eaae772abc
commit
7d32e30154
|
@ -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" };
|
||||||
|
|
|
@ -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 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue