-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix Templates page infinite loading by adding error handling to API calls #3252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
+77
−36
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add try-catch blocks to Templates.vue loadData() and loadViews() methods - Add error handling to ItemListPageBase.js loadItems() method - Add error handling to AppsMixin.js for apps data loading - Ensure page can render with empty arrays when API calls fail - Add console error logging to help diagnose future issues Co-authored-by: fiftin <914224+fiftin@users.noreply.github.com>
@Copilot
Copilot
AI
changed the title
(削除) [WIP] Problem: Page "Task Templates" doesnt load (削除ここまで)
(追記) Fix Templates page infinite loading by adding error handling to API calls (追記ここまで)
Aug 30, 2025
Copilot finished work on behalf of
fiftin
August 30, 2025 14:30
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
The Task Templates page would get stuck in an infinite loading state when any of the required API calls failed. This happened because the page uses
Promise.all()
to load multiple resources in parallel (inventory, environment, repositories, views, apps), and if any single call failed, the entire loading process would hang.Root Cause
The Templates page loading logic had no error handling:
When users created SSH keys, repositories, and inventories, certain API endpoints might fail due to permissions, network issues, or server errors, causing the page to remain in loading state indefinitely.
Solution
Added comprehensive error handling to ensure the page can render even when some API calls fail:
Changes Made
loadData()
andloadViews()
methodsloadItems()
method used by TemplatesThe page will now load successfully with available data even when some resources fail to load, resolving the infinite loading issue.
Fixes #3245.
💬 Share your feedback on Copilot coding agent for the chance to win a 200ドル gift card! Click here to start the survey.