Fixes + stable gateway ids
This commit is contained in:
@@ -85,14 +85,18 @@ func statusFromError(err error) string {
|
||||
if err == nil {
|
||||
return "success"
|
||||
}
|
||||
|
||||
st, ok := status.FromError(err)
|
||||
if !ok {
|
||||
return "error"
|
||||
}
|
||||
|
||||
code := st.Code()
|
||||
|
||||
if code == codes.OK {
|
||||
return "success"
|
||||
}
|
||||
|
||||
return strings.ToLower(code.String())
|
||||
}
|
||||
|
||||
@@ -101,5 +105,6 @@ func docTypeLabel(docType documentsv1.DocumentType) string {
|
||||
if label == "" {
|
||||
return "DOCUMENT_TYPE_UNSPECIFIED"
|
||||
}
|
||||
|
||||
return label
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user