log caught member insert errors for debugging purposes
All checks were successful
Build / build (22) (pull_request) Successful in 1m9s
Build / build (22) (push) Successful in 36s
Build / build (20) (push) Successful in 1m9s
Build / build (18) (push) Successful in 1m14s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 1m9s
All checks were successful
Build / build (22) (pull_request) Successful in 1m9s
Build / build (22) (push) Successful in 36s
Build / build (20) (push) Successful in 1m9s
Build / build (18) (push) Successful in 1m14s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 1m9s
This commit is contained in:
parent
83cd6652ba
commit
e33bbb0f95
@ -42,6 +42,7 @@ export const addToGuildController: RequestHandler = async (req, res) => {
|
|||||||
status: 2 // outgoing invite
|
status: 2 // outgoing invite
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
logger.debug(`guild invite failed due to ${String(e)}`);
|
||||||
res.status(400).json("User already invited to clan");
|
res.status(400).json("User already invited to clan");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -87,7 +88,7 @@ export const addToGuildController: RequestHandler = async (req, res) => {
|
|||||||
RequestExpiry: new Date(Date.now() + 14 * 86400 * 1000) // TOVERIFY: I can't find any good information about this with regards to live, but 2 weeks seem reasonable.
|
RequestExpiry: new Date(Date.now() + 14 * 86400 * 1000) // TOVERIFY: I can't find any good information about this with regards to live, but 2 weeks seem reasonable.
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Assuming this is "E11000 duplicate key error" due to the guildId-accountId unique index.
|
logger.debug(`alliance invite failed due to ${String(e)}`);
|
||||||
res.status(400).send("Already requested");
|
res.status(400).send("Already requested");
|
||||||
}
|
}
|
||||||
res.end();
|
res.end();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user