- Issue created by @joachim
- 🇬🇧United Kingdom danchamp Angus
@joachim Do you know which version of the Whitespace API is in use for your site? Do you have the API documentation?
The plugin was written for a Council using v11.0, but I know that changes were introduced in v11.1 (such as support for date ranges beyond a single month), and there may be later versions with more breaking changes.
- 🇬🇧United Kingdom joachim
> Do you know which version of the Whitespace API is in use for your site?
No, I'm afraid.
> Do you have the API documentation?
No -- I've looked on the Whitespace website for documentation on their API, and I can't find anything (and it crashes!)
- 🇬🇧United Kingdom joachim
It was a domain problem -- I was connecting to an environment that didn't have up-to-date collections.
Catching of Whitespace exceptions has been added to 🐛 Guzzle exceptions in Whitespace provider are not caught Active , but the code here still needs to check for the case where the returned XML has:
<Collections i:nil="true"/>
I can't figure out how to get that by inspecting the $collectionsXml from:
$collectionsXml = $xml ->children('s', TRUE) ->Body ->children('http://webservices.whitespacews.com/') ->GetCollectionByUprnAndDateResponse ->GetCollectionByUprnAndDateResult ->Collections;
SO says I should be able to cast $collectionsXml to bool and get FALSE, but that's not working.
- 🇬🇧United Kingdom joachim
Added checking of the error code.
I'm having it return an empty array at the moment. I'm not sure if this is the best thing, as that means the controller will show:
No collection schedule found
We could not retrieve the collection schedule for this property. Please check this is a domestic property, and contact us if the problem continues.
-- is that the most accurate thing to show the user?