7
duckWit
6y

When I hit the endpoint from Postman it works. When I hit the endpoint from my application that pushes data to the endpoint it doesn't work, returning a 404 status code. I KNOW the endpoint is there and operational and that both Postman and my application have the same endpoint configured, letter for letter.

So lost. So confused. What the hell is going on.

I decide to install Fiddler to monitor the traffic to see if I can see anything helpful.

I initiate the request again from the application and immediately see that the request size is huge. BAM. It immediately hits me, the payload to the endpoint is too big and the server is "rejecting" it with a 404. I post a smaller request with the application and it works fine.

Yay, saved by Fiddler.

Why does the endpoint default to 404 in such scenarios. The definition of 404: "the client was able to communicate with a given server, but the server could not find what was requested"

In my case, the 404 returned was a red herring. I understand that the substatus code gives more information on why the 404 was returned, in my case the request size being too big, but 404 in general feels like the wrong status code to return because the endpoint IS there. It made me troubleshoot the wrong thing.

Thanks, IIS.

Comments
  • 1
    I've had the same issue with an API I consume. Threw 404 and I was like "WTF?". Started making the request smaller and it suddenly works. Stupid response code.....
  • 0
    @Stebner55 it's nice hearing I'm not the only one. The really frustrating part is that I went through this exact troubleshooting exercise about 2 months ago. It's THAT misleading, I didn't even think about the request size being the culprit again until it was staring me in the face.
  • 2
    regarding the big payload, do you have a moment to talk about our lord and savior www.graphql.com ?
  • 1
    @heyheni I gotta admit I really don't know much about it though I have heard the name.

    Maybe come knock on my door again with the same proposal when I have a bit more time to investigate. 😂
Add Comment