added test what should happen if the error code is not 404 nor 409
added test what should happen if the error code is 404 or 409 in controller