Returning error and avoiding any outer reference
parent
eaae772abc
commit
7d32e30154
|
@ -28,7 +28,7 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||
data,
|
||||
});
|
||||
} catch (reason) {
|
||||
logger.error("Could not add Sendgrid app", reason);
|
||||
return { error: true };
|
||||
}
|
||||
|
||||
return { url: "/apps/installed/other?hl=sendgrid" };
|
||||
|
|
|
@ -20,10 +20,10 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||
if (usernameInfo.username) {
|
||||
return {};
|
||||
} else {
|
||||
logger.error("Could not check Sendgrid app API key");
|
||||
return { error: true };
|
||||
}
|
||||
} catch (e) {
|
||||
logger.error("Could not check Sendgrid app API key", e);
|
||||
return { error: true };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue