Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for writeCustomErrorResponseJSON (0.26 sec)

  1. cmd/kms-handlers.go

    		if err != nil {
    			writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
    			return
    		}
    		values = append(values, kes.KeyInfo{
    			Name: name,
    		})
    	}
    	if res, err := json.Marshal(values); err != nil {
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
    	} else {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  2. cmd/admin-handlers-idp-config.go

    			// If we got an LDAP validation error, we need to send appropriate
    			// error message back to client (likely mc).
    			writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigLDAPValidation),
    				validationErr.FormatError(), r.URL)
    			return
    		}
    
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), err.Error(), r.URL)
    		return
    	}
    
    	// Update the actual server config on disk.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  3. cmd/admin-handlers-config-kv.go

    	}
    
    	if err = cfg.DelFrom(bytes.NewReader(kvBytes)); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	if err = validateConfig(ctx, cfg, subSys); err != nil {
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAdminConfigBadJSON), err.Error(), r.URL)
    		return
    	}
    
    	// Check if subnet proxy being deleted and if so the value of proxy of subnet
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.7K bytes
    - Viewed (0)
  4. cmd/admin-handlers.go

    		resp, err := json.Marshal(response)
    		if err != nil {
    			writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
    			return
    		}
    		writeSuccessResponseJSON(w, resp)
    		return
    	}
    
    	resp, err := json.Marshal(response)
    	if err != nil {
    		writeCustomErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrInternalError), err.Error(), r.URL)
    		return
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
  5. cmd/api-response.go

    	writeResponse(w, err.HTTPStatusCode, encodedErrorResponse, mimeJSON)
    }
    
    // writeCustomErrorResponseJSON - similar to writeErrorResponseJSON,
    // but accepts the error message directly (this allows messages to be
    // dynamically generated.)
    func writeCustomErrorResponseJSON(ctx context.Context, w http.ResponseWriter, err APIError,
    	errBody string, reqURL *url.URL,
    ) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 33.3K bytes
    - Viewed (2)
Back to top