Hello, I start with MARS and I need to show on client exception message from server.
What I mean:
Server side:
function THelloWorldResource.SayHelloWorld: string;
begin
Result := 'Hello World message!';
raise EMARSApplicationException.Create('This is server exception message.', 500);
end;
On client I tried this:
DataModuleRest.HelloWorldResource.GET(nil, nil,
procedure (AException: Exception)
begin
raise Exception.Create('Exception message: '+AException.Message);
end);
But only error message what I get on client is "HTTP/1.1 500 Internal Server Error"
Please can you help me, how to get the server exception message on the client?