added the correct error handling for the failing test
2 files changed