How to handle Frappe API error code in erpnext mobile app

I have implemented the Frappe API and I want to handle every error code in the Frappe API. I am getting only exception.