Closed bethesque closed 10 months ago
Maybe we should include the selectors that were used in the request?
Yes, that would be handy. I might need to learn a bit more rust to submit that though! Shall we start with this one and then improve it?
It is going to need a refactor, as you mentioned, this code seems to be handling an error, rather than dealing with the source occurrence. I'm happy to take this on.
Thanks Ron. I'm confused where the message for pacts.length == 0 is coming from though, because I can't find any other instance of that text, and that's definitely the message people are getting when there are no pacts returned. Is there another codebase?
pacts.length == 0
is not coming from the Rust code, that must be from the client implementation.
What I'm trying to achieve is to change the message from "Could not load pacts from the pact broker" to "No pacts found matching the given consumer version selectors in pact broker" when there are no pacts returned in the pacts-for-verification response. The current message makes it sound like there was a problem during the actual fetching process.
I don't think this is the right place, because this code seems to be handling an error, rather than dealing with a
pacts.length == 0
scenario, but I thought I'd start somewhere!