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:
Toby Zerner
2015-08-04 13:03:46 +09:30
parent a14be00041
commit 5b3484d3c8
5 changed files with 34 additions and 6 deletions

View File

@ -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
}));
});
}