Fix HTTPException handling in folder endpoints and install script path

- Add missing `except HTTPException: raise` in create_folder and
  update_folder endpoints to prevent 400 errors being masked as 500s
- Fix install_task_windows.ps1 working directory to point to
  media-server root instead of parent project root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 13:09:47 +03:00
parent 8d15a2a54b
commit c5f8c7a092
2 changed files with 8 additions and 4 deletions

View File

@@ -113,6 +113,8 @@ async def create_folder(
"message": f"Media folder '{request.folder_id}' created successfully",
}
except HTTPException:
raise
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
except Exception as e:
@@ -161,6 +163,8 @@ async def update_folder(
"message": f"Media folder '{folder_id}' updated successfully",
}
except HTTPException:
raise
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))
except Exception as e: