snow-flow 10.0.199 → 10.0.200
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/package.json
CHANGED
|
@@ -122,6 +122,10 @@ export class ServiceNowAuthManager {
|
|
|
122
122
|
// Get fresh access token
|
|
123
123
|
const accessToken = await this.getAccessToken(context)
|
|
124
124
|
|
|
125
|
+
if (!accessToken) {
|
|
126
|
+
throw new Error("Failed to obtain access token. Please verify ServiceNow credentials and run: snow-flow auth login")
|
|
127
|
+
}
|
|
128
|
+
|
|
125
129
|
// Determine correct Authorization header format
|
|
126
130
|
// Basic auth tokens already include "Basic " prefix, Bearer tokens don't
|
|
127
131
|
const authHeader = accessToken.startsWith("Basic ") ? accessToken : `Bearer ${accessToken}`
|
|
@@ -204,6 +208,10 @@ export class ServiceNowAuthManager {
|
|
|
204
208
|
mcpDebug("[Auth] 401 received, clearing invalid accessToken and forcing refresh...")
|
|
205
209
|
const newAccessToken = await this.getAccessToken(context)
|
|
206
210
|
|
|
211
|
+
if (!newAccessToken) {
|
|
212
|
+
throw new Error("Failed to obtain access token after 401 refresh. Please run: snow-flow auth login")
|
|
213
|
+
}
|
|
214
|
+
|
|
207
215
|
// Update request with new token
|
|
208
216
|
// Check if it's already a full auth header (Basic auth) or just a Bearer token
|
|
209
217
|
if (newAccessToken.startsWith("Basic ")) {
|