- Sort Score
- Result 10 results
- Languages All
Results 11 - 18 of 18 for writeErrorResponseJSON (0.2 sec)
-
cmd/admin-bucket-handlers.go
writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL) return } config, _, err := globalBucketMetadataSys.GetQuotaConfig(ctx, bucket) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } configData, err := json.Marshal(config) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return
Registered: 2024-06-16 00:44 - Last Modified: 2024-05-24 23:05 - 32.7K bytes - Viewed (0) -
cmd/admin-handler-utils.go
switch adminAPIErr { case ErrNone: return objectAPI, cred case ErrAccessDenied: // Try another continue default: writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(adminAPIErr), r.URL) return nil, cred } } writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAccessDenied), r.URL) return nil, auth.Credentials{} } // AdminError - is a generic error for all admin APIs.
Registered: 2024-06-16 00:44 - Last Modified: 2024-05-24 23:05 - 8.2K bytes - Viewed (0) -
cmd/batch-handlers.go
if err := objectAPI.Walk(ctx, minioMetaBucket, batchJobPrefix, resultCh, WalkOptions{}); err != nil { writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL) return } listResult := madmin.ListBatchJobsResult{} for result := range resultCh { if result.Err != nil { writeErrorResponseJSON(ctx, w, toAPIError(ctx, result.Err), r.URL) return } req := &BatchJobRequest{}
Registered: 2024-06-16 00:44 - Last Modified: 2024-06-11 03:13 - 56K bytes - Viewed (0) -
cmd/metrics.go
if ok { tc.FuncName = "handler.MetricsLegacy" tc.ResponseRecorder.LogErrBody = true } mfs, err := gatherers.Gather() if err != nil { if len(mfs) == 0 { writeErrorResponseJSON(r.Context(), w, toAdminAPIErr(r.Context(), err), r.URL) return } } contentType := expfmt.Negotiate(r.Header) w.Header().Set("Content-Type", string(contentType))
Registered: 2024-06-16 00:44 - Last Modified: 2024-05-24 23:05 - 16.6K bytes - Viewed (0) -
cmd/api-response.go
// Generate string error response. writeResponse(w, err.HTTPStatusCode, []byte(err.Description), mimeNone) } // writeErrorResponseJSON - writes error response in JSON format; // useful for admin APIs. func writeErrorResponseJSON(ctx context.Context, w http.ResponseWriter, err APIError, reqURL *url.URL) { // Generate error response.
Registered: 2024-06-16 00:44 - Last Modified: 2024-06-10 15:31 - 33.5K bytes - Viewed (0) -
cmd/handler-utils.go
default: desc = fmt.Sprintf("Unexpected client 'admin' API version found '%s', expected '%s', please downgrade the client to older releases", version, madmin.AdminAPIVersion) } writeErrorResponseJSON(r.Context(), w, APIError{ Code: "XMinioAdminVersionMismatch", Description: desc, HTTPStatusCode: http.StatusUpgradeRequired, }, r.URL) default:
Registered: 2024-06-16 00:44 - Last Modified: 2024-06-10 15:31 - 15.5K bytes - Viewed (0) -
cmd/admin-router.go
// Check if object layer is available, if not return error early. if !handlerFlags.Has(noObjLayerFlag) { objectAPI := newObjectLayerFn() if objectAPI == nil || globalNotificationSys == nil { writeErrorResponseJSON(r.Context(), w, errorCodes.ToAPIErr(ErrServerNotInitialized), r.URL) return } } // Apply http tracing "middleware" based on presence of flag. var f2 http.HandlerFunc
Registered: 2024-06-16 00:44 - Last Modified: 2024-03-10 21:09 - 25.5K bytes - Viewed (0) -
cmd/metrics-v2.go
if ok { tc.FuncName = funcName tc.ResponseRecorder.LogErrBody = true } mfs, err := gatherers.Gather() if err != nil && len(mfs) == 0 { writeErrorResponseJSON(r.Context(), w, toAdminAPIErr(r.Context(), err), r.URL) return } contentType := expfmt.Negotiate(r.Header) w.Header().Set("Content-Type", string(contentType))
Registered: 2024-06-16 00:44 - Last Modified: 2024-06-13 22:26 - 131.9K bytes - Viewed (0)