Add error test for the 4 cases with return

Test for each error, just try with couch db

fix preview commit thanks to stash shitty command