Show days API errors properly
parent
f09322d866
commit
515addf497
|
@ -148,7 +148,7 @@ class ApiController extends Controller {
|
|||
$recursive = is_null($this->request->getParam('folder'));
|
||||
$archive = !is_null($this->request->getParam('archive'));
|
||||
if (is_null($folder)) {
|
||||
return new JSONResponse([], Http::STATUS_NOT_FOUND);
|
||||
return new JSONResponse(["message" => "Timeline folder not found"], Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
|
||||
// Run actual query
|
||||
|
|
|
@ -563,6 +563,9 @@ export default class Timeline extends Mixins(GlobalMixin, UserConfig) {
|
|||
const data = res.data;
|
||||
if (this.state !== startState) return;
|
||||
await this.processDays(data);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
showError(err?.response?.data?.message || err.message);
|
||||
} finally {
|
||||
this.loading--;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue