More spec added for error handling