Added error handling for worker not found
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-02-28 08:39:59 +01:00
parent b0779fb2d3
commit 3739548d0d
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ module.exports = Self => {
const userId = ctx.req.accessToken.userId;
if (!account)
throw new Error(`Could not send message to worker id ${workerId} from user ${userId}`);
throw new Error(`Could not send message "${message}" to worker id ${workerId} from user ${userId}`);
const query = `SELECT worker_isWorking(?) isWorking`;
const [result] = await Self.rawSql(query, [workerId]);