Ontology SDK - How to debug calls to Foundry Functions?

I’m developing some @Query Foundry Functions which I’m calling via API via the OSDK.

I received failures like

{
    "errorCode": "INTERNAL",
    "errorName": "Default:Internal",
    "errorInstanceId": "xxxxx",
    "parameters": {}
}

How can I debug further what is wrong in my function ? Is there a debug mode or something I can tweak to get more details about the failures ?

Hi Vincent! For errors like this, it might be helpful to file a support ticket.
Otherwise, you can refer to our docs: https://www.palantir.com/docs/foundry/api/general/overview/errors/

From the question it sounds that you are using TypeScript to write a function on Object function, and you decorate it with the @query decorator

If that is true, then I would start by debugging the function within the function repository using the preview and even the debugger.

After you have it working and publish a fixed version you can try and call it from your OSDK application. – I would also recommend looking at the network tab of the call and making sure the request is what you expect (similar to the rest call on the documentation page)

For reference, the issue was that I didn’t imported correctly the Links and Objects in my OSDK application, that my Function was using. Importing them made it work :slight_smile:

Additional information was available in the Developer Console, where it actually warned me that some imports were required.

image

image

1 Like