improve exception handling

This commit is contained in:
Philipp Holzer 2020-01-31 22:25:09 +01:00
parent 082a1982d3
commit abbf036685
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90

View file

@ -5972,9 +5972,9 @@ function api_friendica_notification_seen($type)
}
return api_format_data('result', $type, ['result' => "success"]);
} catch (NotFoundException $e) {
throw new BadRequestException('Invalid argument');
throw new BadRequestException('Invalid argument', $e);
} catch (Exception $e) {
throw new InternalServerErrorException('Internal Server exception');
throw new InternalServerErrorException('Internal Server exception', $e);
}
}