if receiving an exit code other than 0, updating the db with an error.
Merge branch 'codes' into dev