Removed pending statement from create invoice
Removed format_error from rest api call