Jump to content
KostasR

Log an error: [api] No implementation found for http method GET

Recommended Posts

 

It happens that a method is called that does not exist. Then I get the error message "[api] No implementation found for http method GET".
Is there a way to write the called method and this parameters to a log?

 

Regards 

  Kostas

Share this post


Link to post

Dear Kostas,

firstly I want to apologize not being much available these months. I've been very busy and many things fell behind.

 

The easiest way to log errors in MARS is to provide an InvokeError handler:

 

    TMARSActivation.RegisterInvokeError(
      procedure (const AActivation: IMARSActivation; const AException: Exception; var AHandled: Boolean)
      begin
        CodeSite.SendError('Error: ' + AException.Message + ' Path: ' + AActivation.URL.Path);
      end
    );

 

There is an (empty) example of this in Server.Ignition.pas unit of the MARSTemplate (Demos folder).

 

Hope this helps!

 

Sincerely,

Andrea

 

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
×