hi, we're seeing this error intermittently, seemin...
# pactflow
m
hi, we're seeing this error intermittently, seemingly when the publish is called, the hash that gets created for the contract is invalid, though I believe we're not the ones hashing the json? Any thoughts on how to guard against this? Was advised it's intermittent and it is on the OAS file upload
Copy code
status=400 {"title":"Validation errors","type":"<https://problems-registry.smartbear.com/validation-error>","status":400,"instance":"/","errors":[{"detail":"content could not be parsed as application/json","pointer":"#/contract/content"},{"detail":"content when Base64 decoded and parsed must be a hash","pointer":"#/contract/content"}]}
m
Hmm I’m not aware of any issues in this space. If you could get a request ID from the logs (if accessible) that would help us quickly look at it. I’ve seen this before (I think?) if it contains an invalid UTF-8 sequence or characters. @phanindra srungavarapu does this ring a bell? Are we seeing any increase in issues in our logs or anything?
m
can't see any request Id from the logs as we don't have verbose logs enabled :<
m
You’re right in that the base64 encoding happens client side (in the CLI). I’m assuming you’re on the latest CLI version?
p
this error happens if the contract content is not a hash I think, not quite sure why it was intermittent
we're not the ones hashing the json
is the OAS auto generated by some other tool? can you verify if the OAS is valid at your end?
m
But the hash is a Ruby construct, right? What could cause it not to be correctly encoded? That is, this is a server side error, and the ruby client is doing the encoding. I think you're asking if the OAS is invalid JSON (or yaml)?
p
ya sorry, I meant if the OAS has invalid JSON object ( not ruby hash )
m
It should be generated by spring yes, but will debug. The intermittent part is what makes it odd for me thinking2 why would it be ok some times and not others? presumably it should mostly be static, it's not like the test verification file think up
safe to ignore - got to the bottom of it (people shutting down workspaces before fetching the OAS..) facepalm
😬 1
thankyou 1