Custom connector in IIQ

Hi Team,

Issue Summary: I am developing a custom connector in IIQ for POC that communicates with an SQL database. However, there is an issue with the Test Connection functionality in the UI. The UI always shows “Test Successful” even when incorrect credentials are provided.

Observed Behavior: Despite the incorrect credentials, the logs display an error message, but the UI does not reflect this.

Question: Is there a way to populate the correct error message in the UI based on the credentials provided, instead of always showing “Test Successful”?

in a custom connector you define the behavior of single operation: doc

Why dont use a jdbc connector?

Hi @enistri_devo
This is intended to understand the behavior of the custom connector, so I went with SQLDB.
Could you please elaborate on your response, specifically on how we can print the error message when the connection details are incorrect?"

Hi @DSK211,

You can always use logger statement and if it is for your local system for testing purpose then you can use sysout’s as well to print the error.

If any further help is needed, then can you help with the sample snippet that you tried and not working for logging.

If there is anything that I am missing, then do let me know.

Thanks

Hi @ashutosh_singh
Thank you for the reponse.
I can see the error message in the logs, but I want the same error message to be displayed in the UI when the test connection fails. Is there any way to achieve this?

Hi,

You can put this in the testConnection method:

throw new ConnectorException((new Message("YOUR MESSAGE", new Object[0])).toString() + " " + (new Message("YOUR MESSAGE", new Object[]{th})).toString());

This is just a sample, which you can use to play around with it a bit.

Kr,
Pieter.

Thanks,@pdeloos!it worked!!!

1 Like