Hi Team, probably this is too obvious, but what sh...
# pact-js
m
Hi Team, probably this is too obvious, but what should I review if I’m getting a 500 on my provider test instead of 200 status…. currently the consumer tests are passing for my get and post requests, but I’m getting a failure on the POST - Provider Side
Copy code
1.1) has a matching body
           expected 'application/json;charset=utf-8' body but was 'text/html;charset=utf-8'
    1.2) has status code 200
           expected 200 but was 500
    1.3) includes header 'Content-Type' with value 'application/json; charset=utf-8'
           Expected header 'Content-Type' to have value 'application/json; charset=utf-8' but was 'text/html; charset=utf-8'
t
A 500 in your provider test means that your provider is returning 500. Have a look in your service logs or run the test under a debugger
☝️ 2
m
checking…
thanks, basically it was my fault
Copy code
<pre>TypeError: reasonRepository.insert is not a function<br>...
t
That’s a good result! It’s my belief that 500 should exclusively mean “programmer error”
😄 1