mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
for errors during maildir/mbox zip/tgz import in account page, return http 400 for user errors (e.g. bad file format) and show the error message
This commit is contained in:
@ -973,7 +973,7 @@ const index = async () => {
|
||||
xhr.addEventListener('load', () => {
|
||||
console.log('upload done', { xhr: xhr, status: xhr.status });
|
||||
if (xhr.status !== 200) {
|
||||
reject({ message: 'status ' + xhr.status });
|
||||
reject({ message: xhr.status === 400 || xhr.status === 500 ? xhr.responseText : 'status ' + xhr.status });
|
||||
return;
|
||||
}
|
||||
let resp;
|
||||
|
Reference in New Issue
Block a user