Process does not exit when callback is provided, logic will belong to callback
Normalizing error matching, and adding it to isError assertion as well as throws assertion
Simplifying state error code