Update Js for logs.html
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
type APIError struct {
|
||||
HTTPStatus int
|
||||
Code string
|
||||
Status string `json:"status,omitempty"`
|
||||
Message string
|
||||
}
|
||||
|
||||
@@ -61,11 +62,13 @@ func NewAPIError(base *APIError, message string) *APIError {
|
||||
}
|
||||
|
||||
// NewAPIErrorWithUpstream creates a new APIError specifically for wrapping raw upstream errors.
|
||||
func NewAPIErrorWithUpstream(statusCode int, code string, upstreamMessage string) *APIError {
|
||||
func NewAPIErrorWithUpstream(statusCode int, code string, bodyBytes []byte) *APIError {
|
||||
msg, status := ParseUpstreamError(bodyBytes)
|
||||
return &APIError{
|
||||
HTTPStatus: statusCode,
|
||||
Code: code,
|
||||
Message: upstreamMessage,
|
||||
Message: msg,
|
||||
Status: status,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user