mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Server: Clarify error message when user info cannot be saved
This commit is contained in:
parent
92520e58fb
commit
4567b78f0c
@ -270,6 +270,7 @@ router.post('users', async (path: SubPath, ctx: AppContext) => {
|
|||||||
|
|
||||||
return redirect(ctx, `${config().baseUrl}/users${userIsMe(path) ? '/me' : ''}`);
|
return redirect(ctx, `${config().baseUrl}/users${userIsMe(path) ? '/me' : ''}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
error.message = `Error: Your changes were not saved: ${error.message}`;
|
||||||
if (error instanceof ErrorForbidden) throw error;
|
if (error instanceof ErrorForbidden) throw error;
|
||||||
const endPoint = router.findEndPoint(HttpMethod.GET, 'users/:id');
|
const endPoint = router.findEndPoint(HttpMethod.GET, 'users/:id');
|
||||||
return endPoint.handler(path, ctx, user, error);
|
return endPoint.handler(path, ctx, user, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user