Add error codes for better debugging.
Add error codes for better debugging.