errors.go: add new Code field and fix Error initializations