MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / getAPIErrorResponse

Function getAPIErrorResponse

cmd/api-errors.go:2445–2457  ·  view source on GitHub ↗

getErrorResponse gets in standard error and resource value and provides a encodable populated response values

(ctx context.Context, err APIError, resource, requestID, hostID string)

Source from the content-addressed store, hash-verified

2443// getErrorResponse gets in standard error and resource value and
2444// provides a encodable populated response values
2445func getAPIErrorResponse(ctx context.Context, err APIError, resource, requestID, hostID string) APIErrorResponse {
2446 reqInfo := logger.GetReqInfo(ctx)
2447 return APIErrorResponse{
2448 Code: err.Code,
2449 Message: err.Description,
2450 BucketName: reqInfo.BucketName,
2451 Key: reqInfo.ObjectName,
2452 Resource: resource,
2453 Region: globalSite.Region,
2454 RequestID: requestID,
2455 HostID: hostID,
2456 }
2457}

Callers 7

testAPIGetObjectHandlerFunction · 0.85
writeErrorResponseFunction · 0.85
writeErrorResponseJSONFunction · 0.85
HealHandlerMethod · 0.85
HealthInfoHandlerMethod · 0.85

Calls 1

GetReqInfoFunction · 0.92

Tested by 2

testAPIGetObjectHandlerFunction · 0.68