Add specs for the error message handling