`500` error when validating
From the logs:
INFO: 134.76.22.130:0 - "POST /?url=https%3A%2F%2Fahikar-dev.sub.uni-goettingen.de%2Fapi%2Ftextapi%2Fahiqar%2Fsyriac%2Fcollection.json&recursive=false HTTP/1.0" 500 Internal Server Error
ERROR: Exception in ASGI application 2024-01-12T08:04:34.196129874Z Traceback (most recent call last): 2024-01-12T08:04:34.196133504Z File "/usr/local/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi 2024-01-12T08:04:34.196137564Z result = await app( # type: ignore[func-returns-value] 2024-01-12T08:04:34.196139444Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196141364Z File "/usr/local/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send) 2024-01-12T08:04:34.196146054Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196147874Z File "/usr/local/lib/python3.11/site-packages/fastapi/applications.py", line 1106, in __call__
await super().__call__(scope, receive, send) 2024-01-12T08:04:34.196151694Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 364, in _sentry_patched_asgi_app 2024-01-12T08:04:34.196153674Z return await middleware(scope, receive, send) 2024-01-12T08:04:34.196155474Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196157274Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 146, in _run_asgi3 2024-01-12T08:04:34.196159264Z return await self._run_app(scope, receive, send, asgi_version=3) 2024-01-12T08:04:34.196161134Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 241, in _run_app 2024-01-12T08:04:34.196164904Z raise exc from None 2024-01-12T08:04:34.196166674Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 234, in _run_app 2024-01-12T08:04:34.196168564Z return await self.app( 2024-01-12T08:04:34.196170314Z ^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196172104Z File "/usr/local/lib/python3.11/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send) 2024-01-12T08:04:34.196175984Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call 2024-01-12T08:04:34.196199514Z return await old_call(app, scope, new_receive, new_send, **kwargs) 2024-01-12T08:04:34.196201724Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196203654Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc 2024-01-12T08:04:34.196207554Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/errors.py", line 162, in __call__ 2024-01-12T08:04:34.196212104Z await self.app(scope, receive, _send)
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 256, in _sentry_exceptionmiddleware_call 2024-01-12T08:04:34.196217114Z await old_call(self, scope, receive, send) 2024-01-12T08:04:34.196218954Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
return await old_call(app, scope, new_receive, new_send, **kwargs) 2024-01-12T08:04:34.196222794Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196224674Z File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 157, in _create_span_call
return await old_call(app, scope, new_receive, new_send, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196237855Z File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e 2024-01-12T08:04:34.196241545Z File "/usr/local/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__ 2024-01-12T08:04:34.196243605Z await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle 2024-01-12T08:04:34.196251595Z await self.app(scope, receive, send)
File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 66, in app 2024-01-12T08:04:34.196255565Z response = await func(request)
^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196261915Z File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations/fastapi.py", line 136, in _sentry_app
return await old_app(*args, **kwargs) 2024-01-12T08:04:34.196265805Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 274, in app 2024-01-12T08:04:34.196269785Z raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196274555Z File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196280565Z File "/app/api.py", line 62, in validate_rest
results = validate(url, recursive) 2024-01-12T08:04:34.196284245Z ^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api.py", line 93, in validate 2024-01-12T08:04:34.196287985Z result = [validate_single_file_from_url(url)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196291695Z File "/app/api.py", line 133, in validate_single_file_from_url
data = get_json_from_url(url)
^^^^^^^^^^^^^^^^^^^^^^
File "/app/api.py", line 167, in get_json_from_url
return json.loads(response.text)
^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-01-12T08:04:34.196302475Z File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s) 2024-01-12T08:04:34.196306155Z ^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2024-01-12T08:04:34.196311655Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None 2024-01-12T08:04:34.196317285Z json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)