mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2026-01-24 22:27:52 +00:00
allow registration if checkAccountLimits cannot reach DB (#104)
This commit is contained in:
@@ -132,6 +132,10 @@ const checkAccountLimits = async(req, res, next) => {
|
||||
next();
|
||||
} catch (err) {
|
||||
logger.error({err, realm}, 'checkAccountLimits: error checking account limits');
|
||||
// if we can not reach the db for some reason, allow the registration to proceed
|
||||
if (err.message?.includes('connect ECONNREFUSED')) {
|
||||
return next();
|
||||
}
|
||||
res.send(500);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user