mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: add verbose error messaging (#3053)
This commit is contained in:
@ -185,6 +185,10 @@ func (e *Error) StatusCode() int {
|
||||
return e.statusCode
|
||||
}
|
||||
|
||||
func (e *Error) Friendly() string {
|
||||
return fmt.Sprintf("%s. %s", strings.TrimSuffix(e.Message, "."), e.Helper)
|
||||
}
|
||||
|
||||
func (e *Error) Error() string {
|
||||
var builder strings.Builder
|
||||
if e.method != "" && e.url != "" {
|
||||
|
Reference in New Issue
Block a user