Rename error function
Add a map of errors