app/controllers/medivo/labs_controller.rb in medivo-0.1.14 vs app/controllers/medivo/labs_controller.rb in medivo-0.1.15

- old
+ new

@@ -6,11 +6,13 @@ end def appointment_data data = Medivo::Appointment.find(params[:lab_code], params[:appointment_date]) render :json=> data, :layout => nil - rescue - render :json=> {:code=>'Failure', :msg=>"Problem getting data"}, :status=> 500, :layout => nil + rescue => e + render :json=> {:status=>'Error', :message=>"Problem getting data: #{e.message}"}, + :status=> 500, + :layout => nil end end end