Michal S.
-
Content Count
3 -
Joined
-
Last visited
Posts posted by Michal S.
-
-
Hello @Andrea Magni,
thank you for your reply, but it doesn't work for me 😞
Even if I try the Hello world demo and modify the HelloWorld server function this way:
function THelloWorldResource.HelloWorld(): string; begin Result := 'Hello, World!'; raise EMARSHttpException.Create('This is my ugly error message...'); end;
On the client side I still have only Internal server error message.
Â
Don't you have some demo for this?
Thank you very much
Â
Sincerely,
Michal
-
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?
Get Exception message on client
in MARS-Curiosity REST Library
Posted
Hello @Andrea Magni,
still the same 😞 - I'm using TMARSClient and when I declare MarsApplication.OnError handler, I receive again only general exception with 500 Internal Server Error message.
Â
On the client the EIdHttpProtocolException is raised, but from your example we need the EMARSClientHttpException, where error message is in the Exception.Content.
Â
Maybe update the Hello world demo will be the best way (I'm trying on the Hello world demo too).
Â
Thanks for your help
Â
Sincerely,
Michal