@lawpath-tech/npm-auth 1.0.3 → 1.0.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.
- package/bin/cli.js +6 -4
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -88,11 +88,13 @@ async function main() {
|
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
if (!response.ok) {
|
|
91
|
+
const errorBody = await response.text();
|
|
92
|
+
console.error(`Error: API returned status ${response.status}`);
|
|
93
|
+
console.error(`Response: ${errorBody}`);
|
|
91
94
|
if (response.status === 401) {
|
|
92
|
-
console.error('
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
console.error(`Error: API returned status ${response.status}`);
|
|
95
|
+
console.error('Invalid or expired lp_auth_token');
|
|
96
|
+
} else if (response.status === 403) {
|
|
97
|
+
console.error('Access forbidden - check token permissions');
|
|
96
98
|
}
|
|
97
99
|
process.exit(1);
|
|
98
100
|
}
|