fix: fix issue with handling the response codes properly