[Progress Communities] [Progress OpenEdge ABL] Forum Post: Handling blank body in request [ REST] while receiving it as prodataset

Status
Not open for further replies.
M

mdanwarh

Guest
Hi, I have written my code in such a way that receiving a JSON object as prodataset in my rest program. When I am passing blank dataset [ nothing in body], I am getting the following error. My rest program is not getting called at all. I would like to send a custom message instead of Progress Error. Something like { "StatusMessage": "No request body" } I am getting the progress Error in log [ see below] [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS -- TRACE: cso4GL: In execCall() - execProc() failed. (8458) [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS -- TRACE: Set open 4GL server state to 5. (8400) [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS -- TRACE: STATELESS: putting SINGLERUN proxy d6dd7952 (handle: 6204478) on the pending deletion list (8458) [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS Server Message state = MSGSTATE_SENDRESP [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS -- TRACE: Set open 4GL server state to 1. (8400) [19/09/23@05:58:15.902-0400] P-011028 T-009424 1 AS -- Error attempting to run 'TravelerCreate TravelerCreateCrmGis.p'. JSON value of ProDataset or temp-table parameter is invalid or empty. (16992) [19/09/23@05:58:15.902-0400] P-011028 T-009424 1 AS -- An incomplete client request. (8020) [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS -- TRACE: open4GLRead 65. (8403) [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS Server Message state = MSGSTATE_FINISHRQ [19/09/23@05:58:15.902-0400] P-011028 T-009424 4 AS AS Server Message state = MSGSTATE_IDLE My Rest Program: PROCEDURE abc: /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ DEFINE INPUT PARAMETER DATASET FOR dsTravelerCreate. . . . . CATCH e AS Progress.Lang.Error : MESSAGE "Inside catch 0923 Error in DAtaset". END CATCH. End procedure.

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