Skip to content

Commit

Permalink
needs error handling and/or redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
horatiorosa committed Jan 6, 2025
1 parent 580bb36 commit 247514f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion server/src/projects/projects.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,17 @@ export class ProjectsService {
and createdon ge '${new Date(Date.now() - 3e5).toISOString()}'
`
)
const { records } = crmResponse;
console.debug('LOGGER: crm response', crmResponse);
try {
if (records.length > 0) {
console.log('Project already exists');
throw new Error('Project already exists');
}
} catch (e) {

}

console.debug('HELLO??: crm response', crmResponse);

const project = await this.crmService.create(
'dcp_projects',
Expand Down

0 comments on commit 247514f

Please sign in to comment.