Open ocean90 opened 7 years ago
isPluginAvailable()
and isPluginActivelyMaintained()
are already trying to catch an ErrorException
exception. So if loadPluginData()
would return an exception in case of an unavailable API we could instead return true in both methods and print a debug message (once?) that the API couldn't be reached.
We could probably add a private property to the class and set that flag once the API is not available. At the end, add an info/warning if the flag is set.
What if the API is only unavailable for some requests?
Also, it's probably easier to add a custom Exception class for this.
Currently when you run
composer update
and api.w.org isn't available you get two misleading warnings. Example:I suggest to check the HTTP response and provide some more information in this case. Or skip any checks.