try {
$fields = advancedcontentfilter_build_fields($data);
} catch (Exception $e) {
- throw new HTTPException\BadRequestException($e->getMessage(), 0, $e);
+ throw new HTTPException\BadRequestException($e->getMessage(), $e);
}
if (empty($fields['name']) || empty($fields['expression'])) {
try {
$fields = advancedcontentfilter_build_fields($data);
} catch (Exception $e) {
- throw new HTTPException\BadRequestException($e->getMessage(), 0, $e);
+ throw new HTTPException\BadRequestException($e->getMessage(), $e);
}
if (!DBA::update('advancedcontentfilter_rules', $fields, ['id' => $args['id']])) {
$responseCode = 500;
if (is_a($exception, 'Friendica\Network\HTTPException')) {
- $responseCode = $exception->httpcode;
+ $responseCode = $exception->getCode();
}
$errors['message'] = $exception->getMessage();