mirror of
https://github.com/flarum/framework.git
synced 2025-05-21 22:36:01 +08:00
Improve error handling somewhat
- Fix composer crashing/not showing alert on error - Make a general ValidationException which takes an array of field ⇒ messages to be outputted nicely by the API
This commit is contained in:
@ -215,8 +215,8 @@ export default class App {
|
||||
alertErrors(errors) {
|
||||
errors.forEach(error => {
|
||||
this.alerts.show(new Alert({
|
||||
type: 'warning',
|
||||
message: error.detail
|
||||
type: 'error',
|
||||
children: error.detail
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user