replaced error with error code
more detailed error messages