Skip to content

Commit

Permalink
Add question id to error
Browse files Browse the repository at this point in the history
  • Loading branch information
sten committed Nov 26, 2024
1 parent 5e26697 commit 028ced0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Services/SurveyMappingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ public function findQuestionField(SurveyContract $survey, string $questionId, ?s
}
}
//in case nothing is found there is no mapping for the question -> throw error
throw QuestionNotMappedException::create($subquestionId ?? $questionId, 'The question mapping has no field');
$errorQuestion = $subquestionId ?? $questionId;
throw QuestionNotMappedException::create($errorQuestion, "The question mapping for question {$errorQuestion} has no field.");
}

private function getQuestionMapper(string $surveyheroFieldType): ?QuestionMapper
Expand Down

0 comments on commit 028ced0

Please sign in to comment.