title: How to define custom error codes for api in rails
body: <p>I want to define custom error codes in my api response like</p>
  
  <pre><code>{ status: 401,message: "Authentication issue",code: 1000}
  </code></pre>
  
  <p>I want to define this 1000 code in my app with some documentation of explanation. How can I do that?</p>