title: Why is rails-api returning a 500 internal server error instead of 404?
body: <p>Using <code>rails-api</code> :</p>
  
  <pre><code>  def show
      render json: Room.find(params[:id])
    end
  </code></pre>
  
  <p>This works when the resource is found.  But looking for one that doesn't exist returns a 500 error.  Shouldn't this return 404?</p>
  
  <pre><code>&gt; http --json GET chat.dev/api/v1/rooms/23
  HTTP/1.1 500 Internal Server Error
  Connection: close
  Content-Type: text/plain; charset=utf-8
  X-Request-Id: 4cd2ba9f-0f85-4530-9c0a-0ef427ac5b31
  X-Runtime: 0.094633
  
  ActiveRecord::RecordNotFound at /api/v1/rooms/23
  ================================================
  
  &gt; Couldn't find Room with id=23
  
  app/controllers/api/v1/rooms_controller.rb, line 20
  ---------------------------------------------------
  
  ``` ruby
     15         #     render :json =&gt; {}, :status =&gt; :not_found
     16         #   end
     17         # end
     18   
     19         def show
  &gt;  20           render json: Room.find(params[:id])
     21         end
     22   
     23       end
     24   
     25     end    
  </code></pre>