rslifka / vault-zero

Documentation and Issues for the Vault Zero iPad/Apple Silicon app
https://www.vaultzero.app/
MIT License
2 stars 0 forks source link

Fireteam workflow JSON decoding issue #31

Closed rslifka closed 10 months ago

rslifka commented 10 months ago

Seeing this error appear en masse, with respect to Fireteam processing:

[Warden] getTypeForMembership(): Error processing membership information;

error=
keyNotFound(CodingKeys(stringValue: "bungieNetUser", intValue: nil),
  Swift.DecodingError.Context(
    codingPath: [
      CodingKeys(stringValue: "Response", intValue: nil)
    ],
    debugDescription: "No value associated with key CodingKeys(stringValue: \"bungieNetUser\", intValue: nil) (\"bungieNetUser\").", underlyingError: nil
  )
),

membershipId=
{hidden},

response=
{
  "Response": {
    "destinyMemberships":[
      {
        "LastSeenDisplayName":"{hidden}",
        "LastSeenDisplayNameType":3,
        "iconPath":"/img/theme/bungienet/icons/steamLogo.png",
        "crossSaveOverride":0,
        "applicableMembershipTypes":[
          3
        ],
        "isPublic":false,
        "membershipType":3,
        "membershipId":"{hidden}",
        "displayName":"{hidden}",
        "bungieGlobalDisplayName":"{hidden}",
        "bungieGlobalDisplayNameCode":{hidden}
      }
    ]
  },
  "ErrorCode":1,
  "ThrottleSeconds":0,
  "ErrorStatus":"Success",
  "Message":"Ok",
  "MessageData": {
  }
}
rslifka commented 10 months ago

JSON decoder was incorrectly requiring presence of response.bungieNetUser 🙈

Fixed as of https://github.com/rslifka/reckoner-app/commit/38e1147373caae6cc1f59359b1754411871e0b46