mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-03 17:33:15 +00:00
[advancedcontentfilter] Improve error handling
- Add Logger to Slim application to log to Friendica log file - Show more specific error message when rule syntax check fails - Align editorconfig with Composer style - Add minimum PHP version to composer.json
This commit is contained in:
parent
11cc359434
commit
46c65b79be
4 changed files with 31 additions and 25 deletions
|
@ -27,3 +27,6 @@ indent_size = 2
|
|||
[*.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[composer.json]
|
||||
indent_size = 4
|
||||
|
|
|
@ -54,7 +54,7 @@ new Vue({
|
|||
self.rules.push(responseJSON.rule);
|
||||
self.resetForm();
|
||||
}, function (response) {
|
||||
self.errorMessage = response.responseJSON.message;
|
||||
self.errorMessage = response.responseJSON.exception[0].message;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -74,7 +74,7 @@ new Vue({
|
|||
self.rules[self.editedIndex] = rule;
|
||||
self.resetForm();
|
||||
}, function (response) {
|
||||
self.errorMessage = response.responseJSON.message;
|
||||
self.errorMessage = response.responseJSON.exception[0].message;
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
"license": "3-clause BSD license",
|
||||
"minimum-stability": "stable",
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.4"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"autoloader-suffix": "AdvancedContentFilterAddon",
|
||||
"preferred-install": "dist"
|
||||
|
|
|
@ -29,4 +29,4 @@ use Friendica\DI;
|
|||
*/
|
||||
$slim->addRoutingMiddleware();
|
||||
|
||||
$errorMiddleware = $slim->addErrorMiddleware(true, true, true);
|
||||
$errorMiddleware = $slim->addErrorMiddleware(true, true, true, DI::logger());
|
||||
|
|
Loading…
Reference in a new issue