def render_error(path, status, _exception = nil)
      respond_to do |format|
        format.html { render(template: path, status: status) }
        format.json { render(template: path, status: status, layout: false) }
      end
    end
def render_error(path, status, _exception = nil)
      respond_to do |format|
        format.html { render(template: path, status: status) }
        format.json { render(template: path, status: status, layout: false) }
      end
    end
Error renderer

 Formats
   HTML, JSON

 Response
   {
     "status": XYZ,
     "error": "Error message"
   }

 @param path [String] error template path
 @param status [String,Symbol] response status code
 @param _exception [Object] error object
 @return [String] response