No interaction/internal 500 error
See original GitHub issueOk so this perhaps isn’t an issue but I can’t seem to find any additional info on this. I’ve setup the mock with the following:
`MockProviderService.Given($"There is a person with id '{personId}'")
.UponReceiving($"A GET request to retrieve person with id '{personId}'")
.With(new ProviderServiceRequest
{
Method = HttpVerb.Get,
Path = "/api/person",
Headers = new Dictionary<string, object>
{
{"Accept", "application/json"}
}
})
.WillRespondWith(new ProviderServiceResponse
{
Status = 200,
Headers = new Dictionary<string, object>
{
{"Content-Type", "application/json; charset=utf-8"}
},
Body = new
{
personId = 1,
fullName = "Bob Smith"
}
});`
I know I’m not actually passing the personId into the request yet…
However doing the GET just returns the following:
Any ideas 😕
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
HTTP 500 Internal Server Error: What It Means & How to Fix It
An HTTP 500 internal server error is a general error message. It covers unexpected issues that don't fit into existing error codes. HTTP...
Read more >500 Internal Server Error. No interaction found. · Issue #65 ...
Getting a 500 Server error saying interaction not found - even though the interaction is defined. After many many hours of debugging found ......
Read more >What is “HTTP 500 Internal Server Error” and How to Fix It?
Error 500, also known as the Internal Server Error, is a common HTTP status code that indicates an issue on the web server's...
Read more >HTTP Error 500 – Internal Server Error Explained in Plain ...
The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling ...
Read more >500 error: how to solve
The 500 error is a server error and occurs when the requested address cannot be reached. Let's see what it depends on and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Start shouldn’t be needed, as calling
PactBuilder.MockService(...)
will give you a hot (running) mock provider service. See https://github.com/pact-foundation/pact-net/blob/master/PactNet/PactBuilder.cs#L86. That is only really used if you want to restart the service.You definitely had a running mock provider service, as it’s responding to HTTP requests and responding with a 500.
If it was just the content type that was wrong, you’d get an interaction in the
interaction_diffs
array, and it would show you that the content type was wrong. I would infer from this that the interaction was not set up at all at the time that the GET request was made.