CR: export error string generation to a function
This commit is contained in:
1 parent
9440bc5d72
commit
98fa3855bd
4 files changed
+13
-16
No files matched your search
@@ -101,3 +101,11 @@ func ParseRangeNumbers(rangeStr string) (numbers []int64, err error) {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GenerateResponseErrorString(summary string, err error, detailed bool) string {
|
||||
if detailed {
|
||||
return err.Error()
|
||||
} else {
|
||||
return summary
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user