Search code examples
httphttp-status-code-404http-status-code-400

The difference between the 400 and 404 HTTP errors


What the difference between the 400 and 404 HTTP errors?
Can you show me an example for understand the difference?

Thank you.


Solution

  • The 404 represent resource not exist. i.e The called API dose not exist or Request Page dose not exist. But in case 400 the resource exist but input is wrong.

    404
    http://example.com/pageNotExist.html
    
    
    400
    http://example.com/Api/getCustomer/email@xyz.com
    //here email is wrong or not exist