Added more detailed specs for error cases