]> git.mxchange.org Git - friendica.git/commitdiff
improve exception handling
authornupplaPhil <admin@philipp.info>
Fri, 31 Jan 2020 21:25:09 +0000 (22:25 +0100)
committernupplaPhil <admin@philipp.info>
Fri, 31 Jan 2020 21:25:09 +0000 (22:25 +0100)
include/api.php

index b21061646ab2ac351302902a57ba536819769a3c..c9402d46d018ed5221ad5490bddade5626005476 100644 (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);
        }
 }