Question
Rick Prichett · Apr 14, 2021

ERROR #9406: Unexpected format for value of field, alternateId, using class base mapping

Getting the error "ERROR #9406: Unexpected format for value of field, alternateId, using class base mapping" in the trace. I have it defined as:

Class CDSM.MemberAPI.Response2 Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) [ Language = objectscript ]
{ Property alternateId As %String;

  Property benefitPlanId As %String;

and the reply is sending:

[
    {
        "alternateId": "",
        "benefitPlanId": "FLSN4444",

Is there a way to handle the empty fields in the reply that is sent back?

 

 

Product version: IRIS 2020.1
00
1 0 2 47
Log in or sign up to continue

Replies

try:

 Property alternateId As %String(%JSONNULL = 1);

  {
        "alternateId": null ,
        "benefitPlanId": "FLSN4444", 

Found the issue. had to parse differently