You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnbase.HTTPErrorf(http.StatusUnsupportedMediaType, "Invalid Content-Type header: %s. Needs to be empty or application/json", contentType)
128
130
}
129
131
130
-
ifdocid!=""&&body!=nil {
131
-
returnbase.HTTPErrorf(http.StatusBadRequest, "doc body and doc id provided. Please provide either the body or a doc id for the import filter dry run")
132
+
varimportFilterPayloadImportFilterDryRunPayload
133
+
err:=h.readJSONInto(&importFilterPayload)
134
+
// Only require a valid JSON payload if docid is not provided.
135
+
// If docid is provided, the sync function will use the document from the bucket, and the payload is optional.
136
+
iferr!=nil&&docid=="" {
137
+
returnbase.HTTPErrorf(http.StatusUnprocessableEntity, "Error reading sync function payload: %v", err)
138
+
}
139
+
140
+
//if docid != "" && body != nil {
141
+
// return base.HTTPErrorf(http.StatusBadRequest, "doc body and doc id provided. Please provide either the body or a doc id for the import filter dry run")
0 commit comments