Jump to content
Sign in to follow this  
KostasR

Get Error Object

Recommended Posts

    rsUpdateLicence.PUT(
        procedure (AContent: TMemoryStream)
        var LJSONObject: TJSONObject;
            BirthDateStr, FormattedDate: string;
        begin
          JSONValueToStream(LJSONObject, AContent);

        end,

        procedure (AResponse: TStream)
        var
          LResponse: TJSONObject;
        begin
          LResponse := StreamToJSONValue(AResponse) as TJSONObject;
          try
            if Assigned(LResponse) then
            begin
            begin
              LicenseRespose := LResponse.ToRecord<TLicenseRespose>();
              oResult := WriteData(LicenseRespose);

            end;
          finally
            LResponse.Free;
          end;
        end,

        procedure (AErr: Exception)
        begin
          ShowMessage('Error: ' + AErr.Message);
          // How can I get this error-object?

        end);

 

How can I receive this error-object for error-handling in this method, see PostMan Image?

 

 

2025-05-30_113359.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×