format.json {
        return render text: ret[1], status: ret[0] if ret[0] != 200
        render json: {}
      }