title: HTTP Status Code 504
body: <p>I use an application where i enter information regarding a product. Each product has a unique id and can be entered only once, when i try to enter the same product once again in the application it gives me "504" error stating product has already been entered. I understand that its a validation but i do not understand why its returning status code as 504. With my limited knowledge i do know that 504 status signifies that a upstream server has not responded back to the proxy/gateway which in turn would return a status 504 to the browser. 
  Here are my questions
  1. Can we explicitly send a status code to the browser through backend code?
  2. If Question 1 is possible Why do you think developer of that application is sending a 504 status for duplicate entry?</p>
  
  <p>Thanks in advance</p>