Skip to content

Commit

Permalink
[BUGFIX] Resoudre le souci de crash de la page de fin de parcours (PI…
Browse files Browse the repository at this point in the history
…X-15093). (#10448)

Co-authored-by: Guillaume <[email protected]>
  • Loading branch information
La-toile-cosmique and Guillaume authored Oct 31, 2024
1 parent dc22dcc commit bd08eb0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mon-pix/app/routes/assessments/resume.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,14 @@ export default class ResumeRoute extends Route {
}

async _rateAssessment(assessment) {
await assessment.save({ adapterOptions: { completeAssessment: true } });

try {
await assessment.save({ adapterOptions: { completeAssessment: true } });
} catch (adapterError) {
if (adapterError.errors[0].status === '412') {
return this._routeToResults(assessment);
}
throw adapterError;
}
return this._routeToResults(assessment);
}

Expand Down

0 comments on commit bd08eb0

Please sign in to comment.