Added API to enable push and consolidated custom error code.