[progress Communities] [progress Openedge Abl] Forum Post: Re: How To Handle Errors From...

  • Thread starter Thread starter jts-law
  • Start date Start date
Status
Not open for further replies.
J

jts-law

Guest
Thanks for the info Shelley. I removed the REJECT-CHANGES call and started a little deeper debugging. The following is the basic code from my WebHandler: DEF VAR oResponse AS OpenEdge.Net.HTTP.IHttpResponse NO-UNDO. DEF VAR oWriter AS OpenEdge.Web.WebResponseWriter NO-UNDO. DEF VAR iRC AS INT NO-UNDO. iRC = INTEGER(StatusCodeEnum:OK). oResponse = NEW OpenEdge.Web.WebResponse(). DATASET dsLookup:READ-JSON("JsonObject", poRequest:Entity, "EMPTY"). RUN Submit_Lookup IN hProc (INPUT-OUTPUT DATASET dsLookup BY-REFERENCE). DATASET dsLookup:WRITE-JSON ("LONGCHAR", lcBody, TRUE). oResponse:ContentType = "application/json". oResponse:StatusCode = iRC . oResponse:ContentLength = LENGTH(lcBody). oWriter = NEW WebResponseWriter(oResponse). oWriter:Open(). oWriter:Write(lcBody). oWriter:Close(). How should the ERROR, REJECT, ERROR-STRING, etc. properties of the dataset get passed back to the client? The response body back to the client has the data from the dataset as json which includes all of the data records/fields, but no additional attributes. Louis

Continue reading...
 
Status
Not open for further replies.
Back
Top