Skip to content

Commit d9297c3

Browse files
committed
fix: profile fetch errors with error handler
1 parent efdfe95 commit d9297c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

VirtualFinland.UserAPI/src/VirtualFinland.UsersAPI/Activities/Productizer/ProductizerController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public async Task<IActionResult> GetPersonBasicInformation()
8383

8484
var result = await _mediator.Send(new GetPersonBasicInformation.Query(userId));
8585

86-
if (!ProductizerProfileValidator.IsPersonBasicInformationCreated(result)) return NotFound();
86+
if (!ProductizerProfileValidator.IsPersonBasicInformationCreated(result)) throw new NotFoundException("Person not found");
8787

8888
return Ok(result);
8989
}
@@ -121,7 +121,7 @@ public async Task<IActionResult> GetPersonJobApplicantInformation()
121121

122122
var result = await _mediator.Send(new GetJobApplicantProfile.Query(userId));
123123

124-
if (!ProductizerProfileValidator.IsJobApplicantProfileCreated(result)) return NotFound();
124+
if (!ProductizerProfileValidator.IsJobApplicantProfileCreated(result)) throw new NotFoundException("Job applicant profile not found");
125125

126126
return Ok(result);
127127
}

0 commit comments

Comments
 (0)