Closed KoalaGeo closed 1 year ago
It would be good to add a basic integration test too.
It's working approximately as required, outstanding:
errors.py
in response
errors.py
is appropriateIt would be good to add a basic integration test too.
Started with https://github.com/BritishGeologicalSurvey/pyagsapi/pull/101/commits/47e4298841286283d09da543d8398bb08d0606b5 but getting error TypeError: 'function' object does not support the asynchronous context manager protocol
Working with exception of error reporting:
Need to specify response_class
& make it use errors.py in response. The existing errors in errors.py is appropriate.
I've updated the function and tests to handle cases where the upstream API is offline or returning a 500 error. In this case, we will also return a 500 with a helpful message.
I'm happy for this to be merged now.
Requests synthetic PDF log from Groundhog Web Viewer API (https://webservices.bgs.ac.uk/GWBV/viewborehole?loca_id=20200204094811691620) using BGS Loca ID.
Currently gets a 200 response but PDF doesn't display. Tried as both
inline
&attachment
but PDF files are only 1kb - it's not actually pulling the PDF from the web viewer.Addresses https://github.com/BritishGeologicalSurvey/pyagsapi/issues/100