Skip to content

Commit 5d26e7b

Browse files
waleedlatif1claude
andcommitted
fix(servicenow): propagate URL validation errors in getDocument
Match listDocuments behavior — invalid instance URL should surface as a configuration error rather than being swallowed into a "document not found" null response during sync. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fa5ab28 commit 5d26e7b

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

apps/sim/connectors/servicenow/servicenow.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,7 @@ export const servicenowConnector: ConnectorConfig = {
522522
? 'sys_id,short_description,text,wiki,workflow_state,kb_category,kb_knowledge_base,number,author,sys_created_by,sys_updated_by,sys_updated_on,sys_created_on'
523523
: 'sys_id,number,short_description,description,state,priority,category,assigned_to,opened_by,close_notes,resolution_notes,sys_created_by,sys_updated_by,sys_updated_on,sys_created_on'
524524

525-
let instanceUrl: string
526-
try {
527-
instanceUrl = resolveServiceNowInstanceUrl(sourceConfig.instanceUrl as string)
528-
} catch (error) {
529-
logger.warn('Failed to validate ServiceNow instance URL', {
530-
externalId,
531-
error: toError(error).message,
532-
})
533-
return null
534-
}
525+
const instanceUrl = resolveServiceNowInstanceUrl(sourceConfig.instanceUrl as string)
535526

536527
try {
537528
const { result } = await serviceNowApiGet(instanceUrl, tableName, authHeader, {

0 commit comments

Comments
 (0)