fix: return actual error message from token validation endpoint

- Return the specific error from validateProviderToken() instead of
  generic "Failed to validate token." message
- Update test to expect the actual error message

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Andras BacsaiandClaude committed 2025-12-10 13:22:53 +01:00
1 parent 596b1cb76e
commit 56394ba093
2 files changed
+2 -2

No files matched your search

@@ -525,7 +525,7 @@ class CloudProviderTokensController extends Controller
return response()->json([
'valid' => $validation['valid'],
'message' => $validation['valid'] ? 'Token is valid.' : 'Failed to validate token.',
'message' => $validation['valid'] ? 'Token is valid.' : $validation['error'],
]);
}
}