response class: error return in json