Closed akosiaris closed 3 months ago
Taking a quick look, I think your solution is better than mine. As long as no Client's endpoint field is used outside of a request context, it shoud work fine.
I 'll try and code it, run it for a few days and then get back to you.
Thanks for the suggestion!
Updated per your suggestion. I came up with the error name and string but happy to alter name and wording.
Why: Passing an empty string as an endpoint to Client when instantiating a new client might seem like something that should never happen but I managed to trigger it while parsing some input files to register feeds in bulk.
What: In the execute() function, check early if the endpoint is "" and then return immediately nil and a new error, named ErrWrongEndpoint with a descriptive string
Do you follow the guidelines?