@faable/faable 1.38.4 → 1.38.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,16 @@ const loadLiveCredentials = async (store = new CredentialsStore()) => {
44
44
  log.debug?.("Refreshed access token");
45
45
  return next;
46
46
  }
47
- catch {
47
+ catch (e) {
48
+ // The auth server marks a suspension with a stable machine code on the
49
+ // token endpoint's RFC 6749 error body. "Run `faable login` again"
50
+ // would be a lie here — login is denied too — so say what actually
51
+ // happened and stop instead of letting a generic 401 mislead.
52
+ const body = e?.response?.data;
53
+ if (body?.error_code === "user_suspended") {
54
+ log.error("❌ Your account has been suspended. Contact support@faable.com.");
55
+ process.exit(1);
56
+ }
48
57
  // Refresh failed — keep the stale config; the API call's 401 (or
49
58
  // requireApi) will tell the user to run `faable login` again.
50
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/faable",
3
- "version": "1.38.4",
3
+ "version": "1.38.5",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "author": "Marc Pomar <marc@faable.com>",