github.com/hashicorp/vault/sdk@v0.11.0/helper/errutil/error.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package errutil 5 6 // UserError represents an error generated due to invalid user input 7 type UserError struct { 8 Err string 9 } 10 11 func (e UserError) Error() string { 12 return e.Err 13 } 14 15 // InternalError represents an error generated internally, 16 // presumably not due to invalid user input 17 type InternalError struct { 18 Err string 19 } 20 21 func (e InternalError) Error() string { 22 return e.Err 23 }