throwing SugarApiExceptionInvalidParameter in logic hook don't work in mobile app

We have written a custom Before Save logic hook. In the logic hook, we throw a Sugar exception. It is working fine on the web, and the error popup is showing properly, but it is not working in the mobile app.

 $dateOfInspection = $bean->date_of_inspection_c;
if (strtotime($dateOfInspection) > strtotime(date("Y-m-d"))) {
    // Prevent save and show error message
    throw new SugarApiExceptionInvalidParameter("The Date of Inspection cannot be a future date. Please select a valid date.");
}