diff --git a/src/features/need/need.controller.ts b/src/features/need/need.controller.ts index 0bd3935dc..bc7df1e48 100644 --- a/src/features/need/need.controller.ts +++ b/src/features/need/need.controller.ts @@ -21,6 +21,7 @@ import config from 'src/config'; import { convertFlaskToSayRoles, daysDifference } from 'src/utils/helpers'; import { NeedStatusUpdatesAPIApi } from 'src/generated-sources/openapi'; import { SyncService } from '../sync/sync.service'; +import { ServerError } from 'src/filters/server-exception.filter'; @ApiTags('Needs') @ApiSecurity('flask-access-token') @@ -327,6 +328,9 @@ export class NeedController { auditorNgo, ); } + if (!auditor || !purchaser) { + throw new ServerError('huuuuh'); + } console.log(flaskNeed); try { await this.needService.updateNeedContributors(