snow-flow 4.5.2 → 4.5.3

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.
@@ -877,7 +877,32 @@ snow-flow sync status ${widget.sys_id}
877
877
  // Silent fail for custom tables
878
878
  }
879
879
  }
880
- // Generate detailed error message
880
+ // Check if errors suggest OAuth/authentication issues
881
+ const authErrors = errors.filter(({ error }) => {
882
+ const errorStr = error.toLowerCase();
883
+ return errorStr.includes('401') ||
884
+ errorStr.includes('unauthorized') ||
885
+ errorStr.includes('token') ||
886
+ errorStr.includes('oauth') ||
887
+ errorStr.includes('authentication') ||
888
+ errorStr.includes('access denied') ||
889
+ errorStr.includes('forbidden') && errorStr.includes('token');
890
+ });
891
+ if (authErrors.length > 0) {
892
+ console.log(`\nšŸ” OAuth/Authentication Error Detected!`);
893
+ console.log(`āŒ All API calls are failing with authentication errors`);
894
+ console.log(`\nāš ļø Authentication errors:`);
895
+ authErrors.forEach(({ table, error }) => {
896
+ console.log(` ${table}: ${error}`);
897
+ });
898
+ console.log(`\nšŸ”§ OAuth Token Resolution Steps:`);
899
+ console.log(` 1. Your OAuth token has expired or is invalid`);
900
+ console.log(` 2. Run: snow-flow auth login`);
901
+ console.log(` 3. Or check if your ServiceNow instance is accessible`);
902
+ console.log(` 4. Verify your client credentials are correct`);
903
+ throw new Error(`OAuth authentication failed. Your ServiceNow access token has expired or is invalid. Please run 'snow-flow auth login' to re-authenticate.`);
904
+ }
905
+ // Generate detailed error message for non-auth errors
881
906
  console.log(`\nāŒ Artifact detection failed!`);
882
907
  console.log(`šŸ” Searched sys_metadata + ${tables.length} registered tables + ${customTables.length} custom tables`);
883
908
  if (errors.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
4
4
  "description": "Conversational ServiceNow development platform using Claude Code. Multi-agent orchestration with 20+ MCP servers providing 200+ ServiceNow tools for comprehensive platform development.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",