Changed scope of error domain and codes