This repository was archived by the owner on Oct 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
This repository was archived by the owner on Oct 15, 2025. It is now read-only.
db.getByISBN requires an isbn argument from the API #142
Copy link
Copy link
Labels
C - BackendAffects the backend containerAffects the backend containerF - TestingThis issue was found in testingThis issue was found in testingL - PythonAffects code written in PythonAffects code written in Python
Milestone
Description
After the fix for #140 was implemented, the same command would give an internal server error:
@SuitablyMysterious ➜ /workspaces/Library-System (testing-patch) $ curl -X GET http://localhost:8000/Book/getByISBN
{"message": "Internal Server Error"}
@SuitablyMysterious ➜ /workspaces/Library-System (testing-patch) $ docker logs backend
2025-08-02 13:09:29,776 INFO Creating Flask API...
* Serving Flask app '__main__'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:8000
* Running on http://172.19.0.2:8000
Press CTRL+C to quit
2025-08-02 13:09:34,647 ERROR Exception on /Book/getByISBN [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 917, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.13/site-packages/flask/app.py", line 902, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/flask_restful/__init__.py", line 489, in wrapper
resp = resource(*args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/flask/views.py", line 110, in view
return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/flask_restful/__init__.py", line 604, in dispatch_request
resp = meth(*args, **kwargs)
TypeError: getBookByISBN.get() missing 1 required positional argument: 'isbn'
172.19.0.1 - - [02/Aug/2025 13:09:34] "GET /Book/getByISBN HTTP/1.1" 500 -
@SuitablyMysterious ➜ /workspaces/Library-System (testing-patch) $
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C - BackendAffects the backend containerAffects the backend containerF - TestingThis issue was found in testingThis issue was found in testingL - PythonAffects code written in PythonAffects code written in Python
Type
Projects
Status
Done