question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No interaction/internal 500 error

See original GitHub issue

Ok 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:

image

Any ideas 😕

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
neilcampbellcommented, Dec 15, 2017

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.

1reaction
bethesquecommented, Dec 14, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found