Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: show proper error for invalid_grant

thecodrr6d36c86f0d8c
diff --git a/packages/core/utils/http.js b/packages/core/utils/http.js
index f5a970ca2..adc09bab1 100644
--- a/packages/core/utils/http.js
+++ b/packages/core/utils/http.js
@@ -107,10 +107,11 @@ function errorTransformer(errorJson) {
switch (error_description) {
case "invalid_username_or_password":
return "Username or password incorrect.";
- case "invalid_grant":
- return "You token has expired.";
default:
- return error;
+ return (
+ error_description ||
+ "Your token has expired. Please create a backup & relogin."
+ );
}
}
default: