Hi,
I’m currently developing a custom projection and this is how I currently have defined a structure for the Response.
1structure AppointmentDetailsResponse {23 attribute Latitude Number;4 attribute Longitude Number;5 attribute DatasetId Text;6 attribute Technician Structure(TechnicianResponse);7 attribute AdditionalRegion List<Structure(AdditionalRegion)>;8}There are a few weird behaviors that I’m noticing:
- When I add an extra attribute to this AppointmentDetailsResponse structure (e.g. attribute SomeField) like this: 1structure AppointmentDetailsResponse {23 attribute Latitude Number;4 attribute Longitude Number;5 attribute DatasetId Text;6 attribute SomeField Text;7 attribute Technician Structure(TechnicianResponse);8 attribute AdditionalRegion List<Structure(AdditionalRegion)>;9}
and if hard code a value to it in the the logic1response_.some_field := 'TEST';2RETURN response_;
I’m getting this error when I test out the projection:1{2 "error": {3 "code": "DATABASE_ERROR",4 "message": "Database error occurred. Contact administrator.",5 "details": [6 {7 "code": 17001,8 "message": "Internal Error: Image is not in 8.1 format"9 }10 ]11 }12}Even if I don’t set this field in the response and leave it blank, I still get this error.
-
The other weird behavior is if I define the “SomeField” attribute at the end of the structure like this
1structure AppointmentDetailsResponse {2 attribute Latitude Number;3 attribute Longitude Number;4 attribute DatasetId Text;5 attribute Technician Structure(TechnicianResponse);6 attribute AdditionalRegion List<Structure(AdditionalRegion)>;7 attribute SomeField Text;8}I get a different error message:
1{2 "error": {3 "code": "UNEXPECTED",4 "message": "Unexpected internal server error occurred."5 }6}
As soon as I remove this attribute from the AppointmentDetailsResponse structure, everything works fine again.
Here is the the full code of structure definitions:
1structure AppointmentDetailsResponse {2 attribute Latitude Number;3 attribute Longitude Number;4 attribute DatasetId Text;5 attribute Technician Structure(TechnicianResponse);6 attribute AdditionalRegion List<Structure(AdditionalRegion)>;7 attribute SomeField Text;8}910structure AppointmentDetailsRequest {11 attribute Task Structure(Task);12 attribute SiteId Text;13 attribute LanguagePreference Text;14}1516structure Task {17 attribute City Text;18 attribute CountryId Text;19 attribute Patch Text;20 attribute Postcode Text;21 attribute Province Text;22 attribute Street Text;23 attribute TaskType Text;24 attribute Priority Text;25 attribute Technician Structure(TechnicianRequest);26}2728structure TechnicianRequest {29 attribute Id Text;30}3132structure TechnicianResponse {33 attribute ResourceId Text;34 attribute IfsResourceId Text;35}3637structure AdditionalRegion {38 attribute RegionId Text;39}4041structure LocationAddressDetails {42 attribute LocationId Text;43 attribute Street Text;44 attribute Postcode Text;45 attribute City Text;46 attribute Province Text;47 attribute CountryId Text;48}Any insights would be helpful. Thanks!
