make things more stable

This commit is contained in:
einhornimmond 2025-06-18 11:46:11 +02:00
parent d50c2fd276
commit 8a68f57569
2 changed files with 3 additions and 3 deletions

View File

@ -1172,7 +1172,7 @@ export async function findUserByEmail(email: string): Promise<DbUser> {
return dbUser
} catch (e) {
const logger = createLogger()
if (e instanceof EntityNotFoundError) {
if (e instanceof EntityNotFoundError || (e as Error).name === 'EntityNotFoundError') {
// TODO: discuss if it is ok to print email in log for this case
logger.warn(`findUserByEmail failed, user with email=${email} not found`)
} else {

View File

@ -70,7 +70,7 @@ export async function processXComPendingSendCoins(
const receiverFCom = await DbFederatedCommunity.findOneOrFail({
where: {
publicKey: receiverCom.publicKey,
publicKey: Buffer.from(receiverCom.publicKey),
apiVersion: CONFIG.FEDERATION_BACKEND_SEND_ON_API,
},
})
@ -194,7 +194,7 @@ export async function processXComCommittingSendCoins(
logger.debug('find pending Tx for settlement:', pendingTx)
const receiverFCom = await DbFederatedCommunity.findOneOrFail({
where: {
publicKey: receiverCom.publicKey,
publicKey: Buffer.from(receiverCom.publicKey),
apiVersion: CONFIG.FEDERATION_BACKEND_SEND_ON_API,
},