Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST Connector - Account import failing due to illegal char in url

Shilpa_B
New Contributor II
New Contributor II

Hi Team,

The AccountImport job is failing with : Error - to Import Data correctly: NullResponseFromTarget

Below are the logs:

{"log":"2023-06-05 15:46:51,499 [quartzScheduler_Worker-2] DEBUG println.PrintlnToLogger  - Println :: \u001b[1;31m| Error \u001b[22;39mjava.lang.IllegalArgumentException: Illegal character in path at index 69: <hosturl>/github-actions[bot]\u001b[m\n","stream":"stdout","time":"2023-06-05T15:46:51.49924649Z"}

Import Account JSON call:

"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://${connection.hosturl}/api/v3/users?per_page=100&page=1",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "login~#~char",
"displayName": "login~#~char"
},
"makeProcessingStatus": true,
"disableDeletedAccounts": true,
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link==null?'':headers?.Link?.contains('next')?headers?.Link?.split(',')?.size()==2?headers?.Link?.split(',')[0]?.replace('<', '')?.replace('>; rel=\"next\"','')?.trim():headers?.Link?.split(',')[1].replace('<', '').replace('>; rel=\"next\"','').trim():''}"
}
}

 

Any help to resolve this would be highly appreciated.

Thanks,

Shilpa

4 REPLIES 4

DixshantValecha
Saviynt Employee
Saviynt Employee

Hi @Shilpa_B,

The error message you provided indicates that there is an illegal character in the URL path at index 69. The problematic part seems to be the <hosturl>/github-actions[bot] section.

To resolve this issue, you need to ensure that the URL path is valid and does not contain any illegal characters. In this case, it appears that the organization name or username (github-actions[bot]) contains characters that are not allowed in the URL path.

 This is because the URL you are using contains a square bracket [ which is not a valid character in a URL. You need to encode the square bracket as %5B to avoid this error.

In your case, you can encode the organization name or username github-actions[bot] to github-actions%5Bbot%5D.

Shilpa_B
New Contributor II
New Contributor II

Hi @DixshantValecha ,

Thank you for your response.

As mentioned in JSON above, the url does not have special chars or brackets [ ] in hosturl.

"url": "https://${connection.hosturl}/api/v3/users?per_page=100&page=1",

In logs <hosturl> I have masked but that also does not contain special chars or brackets. This github-actions[bot]\u001b[m\n may be I am getting dynamically or as a part of response. How can I correct this?

Thanks,

Shilpa

"url": "https://${connection.hosturl}/api/v3/users.replaceall('[', '%5B').replaceall(']', '%5D')",


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Shilpa_B
New Contributor II
New Contributor II

Hi,

This is still not resolved. Getting same error even after using replaceall

"url": "https://${connection.hosturl}/api/v3/users.replaceall('[', '%5B').replaceall(']', '%5D')"