Upload app logo resulted in Error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at the Applications().ByApplicationId(...).Logo().Put entry point and reproduce the request with the headers and image data shown. Inspect the outgoing Content-Type values and the Microsoft Graph 400 response, then verify the upload succeeds without the text/html parsing error.
Written by the indexing model from the issue text.
Description
Using the below code to upload an Logo for a given App:
headers := abstractions.NewRequestHeaders()
headers.Add("Content-Type", "image/jpg")
configuration := &applications.
ItemLogoRequestBuilderPutRequestConfiguration{
Headers: headers,
}
appLogo, err := os.ReadFile(appLogoFile)
resp, err := client.Applications().ByApplicationId(appObjectID).Logo().Put(
ctx,
appLogo,
configuration,
)
However this results in the below error:
content type text/html does not have a factory registered to be parsed
On debugging further it was found that the APi call results in a a Bad Request 400 erro and the same is getting set in response body resulting in above error.
Looks like Content-tye is set to 2 values image/jpeg and application/octet-stream . Not sure if this is causeing the request to the MS graph API to fail
- Dominant language
- Go
- Stars
- 335
- Forks
- 43
- Avg merge
- 6h 42m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-go
-
ItemItemsItemPermanentDeleteRequestBuilderInternal.Post missing content body/content-type headersOpenstatus:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
microsoftgraph/msgraph-sdk-go#980 ·
Maintainers usually reply within 1 day
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-go#972 ·
Maintainers usually reply within 1 day
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
microsoftgraph/msgraph-sdk-go#969 · 1 comment ·
Maintainers usually reply within 1 day
-
status:waiting-for-triage type:feature
Difficulty 3/5 1-2 days Newbie friendliness 45/100
microsoftgraph/msgraph-sdk-go#964 ·
Maintainers usually reply within 1 day
-
status:waiting-for-triage type:feature
Difficulty 5/5 Over a week Newbie friendliness 20/100
microsoftgraph/msgraph-sdk-go#940 · 1 comment ·
Maintainers usually reply within 1 day
All issues in microsoftgraph/msgraph-sdk-go
Similar issues
-
raised-by:reviewer
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
medici-finance/assay#2681 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
homarr-labs/dashboard-icons#2939 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
AvengeMedia/DankMaterialShell#3761 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
docs: clarify replacement for outdated Terms of Service URL in readme.mdPossibly taken @mohitjoshi-hey claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 66/100