mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +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' : ''}`);
|
||||
} catch (error) {
|
||||
error.message = `Error: Your changes were not saved: ${error.message}`;
|
||||
if (error instanceof ErrorForbidden) throw error;
|
||||
const endPoint = router.findEndPoint(HttpMethod.GET, 'users/:id');
|
||||
return endPoint.handler(path, ctx, user, error);
|
||||
|
Loading…
Reference in New Issue
Block a user