Adding error codes when handling errors.
Adding error codes when handling errors.