Fix/studyai embed duplicate import#3912
Open
PradeepTech-hub wants to merge 10 commits into
Open
Conversation
Line 6 duplicated the import of withErrorHandler and parseJSON from @/lib/error-handler already present on line 3, causing the module to fail during build/evaluation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Hi maintainers, This PR only removes the duplicate imports in:
I verified that my branch only modifies this source file (apart from an unintended The CI failures are being reported in multiple unrelated files, including:
Based on the CI logs, these errors appear to be unrelated to the duplicate-import fix in this PR. Please let me know if you'd like me to rebase or make any additional changes. Thanks! |
Contributor
Author
|
Yes, it is safe to merge. Reason:
|
e331fc5 to
a036414
Compare
Fix syntax errors in 11 files that caused Prettier to exit with code 2, failing the CI format:check step for all PRs: - app/api/attendance/route.js, app/attendance/page.jsx, app/offline/page.jsx: replace corrupted UTF-16 placeholder files with valid modules - app/calendar/page.js, app/productivity/page.js: remove duplicate return statements with stray comment annotations - components/BreathingExercise.js: fix invalid `window.if` syntax - components/LearnovaChatbot.jsx: remove empty template expression - components/ParentDashboard.js: remove duplicate return statements - constants/quizData.js: remove extra closing brace - next.config.mjs: remove trailing UTF-16 garbage bytes - app/api/admin/parent-student-link/route.js: fix misplaced closing brackets and indentation in POST handler Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
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.
The StudyAI embed API route imported
withErrorHandlerandparseJSONtwice from the same module. Duplicate imports caused the module to fail during build or evaluation, preventing the/api/StudyAI/embedendpoint from loading and serving requests.This PR removes the duplicate imports while preserving the existing API behavior.
Description
This PR fixes a build/runtime issue in the StudyAI embed route by removing duplicate imports of
withErrorHandlerandparseJSON. The change ensures the module compiles successfully and the API endpoint loads correctly without modifying any request handling or business logic.Related Issue
Closes #3911
Type of Change
Changes Made
withErrorHandlerandparseJSONfromapp/api/StudyAI/embed/route.js.Screenshots (if applicable)
N/A (Backend build/runtime fix)
Testing
Checklist