adobe / adobe/aa-client-go

Error Unmarshalling Response

Open
#4 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
3
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hello,

I'd just like to raise an issue I've discovered. At least occasionally, when making a query for a report I've seen an unmarshalling issue where the struct requires a float32 but a value of "NaN" string is returned. Understandably this type mismatch causes an issue. Since the json and the struct definition are not compatible the entire content of the response is lost.

https://github.com/adobe/aa-client-go/blob/23c70ca292246808be81056ae7e75db4fb5a6973/analytics/reports-types.go#L177

Contributor guide

Open the contributing guide

Research direction

Start with analytics/reports-types.go at the linked line and inspect how report responses are unmarshalled into the float32 field. Reproduce the report query with a response containing the string "NaN" and trace where decoding fails. Done means the response can be handled without losing its entire contents, with the behavior covered by an appropriate test if the repository has one.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.