Skip to content

[Raremetal-server] Issues with missing masks and encoding #11

Description

@abought

Summary

We have found two issues with Raremetal-server covariance endpoint:

  1. If any of the masks in a region are empty, the server rejects the entire request.
  2. It seems that the success of the request is partially sensitive to the content-type encoding header sent to the server. (see example below using requests; introspect differences using test.request.headers)

Expected behavior

This is a topic for discussion.

Reproducible test case

In the below example, mask 3 is empty for this region, but all other masks are valid.

#!/usr/bin/env python3
import requests

payload = {
  "chrom":"19",
  "start":45400845,
  "stop":45420845,
  "genotypeDataset":1,
  "phenotypeDataset":1,
  "phenotype":"hdl",
  "samples":"ALL",
  "genomeBuild":"GRCh37",
  "masks":[1,2,3,4,5,6]
}

test = requests.post("https://portaldev.sph.umich.edu/raremetal/v1/aggregation/covariance", json=payload)
print(f"{test.status_code} {test.reason}")
print(test.json())

Interestingly, if the POST request is sent using data= instead of json=, the request will succeed. (due to a different content-type header being sent with the request)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions