-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
manage_covers.POST silently returns None on malformed input (covers.py) #12755
Copy link
Copy link
Open
Labels
Lead: @RayBBIssues overseen by Ray (Onboarding & Documentation Lead) [manages]Issues overseen by Ray (Onboarding & Documentation Lead) [manages]Module: Cover ServiceCover Store (book covers service)Cover Store (book covers service)Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Type: BugSomething isn't working. [managed]Something isn't working. [managed]
Metadata
Metadata
Assignees
Labels
Lead: @RayBBIssues overseen by Ray (Onboarding & Documentation Lead) [manages]Issues overseen by Ray (Onboarding & Documentation Lead) [manages]Module: Cover ServiceCover Store (book covers service)Cover Store (book covers service)Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadPriority: 3Issues that we can consider at our leisure. [managed]Issues that we can consider at our leisure. [managed]Type: BugSomething isn't working. [managed]Something isn't working. [managed]
Problem
In
openlibrary/plugins/upstream/covers.py, themanage_covers.POSThandler silently returnsNonewhen theimagesinput is missing the expected-separator. Theelsebranch at line 196-197 only contains# ERRORandpass, so invalid requests fail with no error message or feedback to the user.Reproducing the bug
Nonereturned silentlyScreenshot from local environment:
Context
Found in
openlibrary/plugins/upstream/covers.pyinmanage_covers.POSTaround line 196-197.Breakdown
Replace
# ERRORandpasswith an appropriate error response so the user receives feedback when invalid input is submitted.