-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: error handling for auth0 source (#3038)
* fix: error handling for auth0 source * chore: clear redundant testcase data * refactor: error message * test: add testcases --------- Co-authored-by: chandumlg <[email protected]>
- Loading branch information
1 parent
c7c3110
commit 2a21274
Showing
3 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1116,5 +1116,106 @@ | |
"originalTimestamp": "2022-10-31T06:15:25.196Z" | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "Missing userId", | ||
"input": { | ||
"log_id": "90020221031055712103169676686005480714681762668315934738", | ||
"data": { | ||
"date": "2022-10-31T05:57:06.859Z", | ||
"type": "ss", | ||
"description": "", | ||
"connection": "Username-Password-Authentication", | ||
"connection_id": "con_djwCjiwyID0vZy1S", | ||
"client_id": "vQcJNDTxsM1W72eHFonRJdzyOvawlwIt", | ||
"client_name": "All Applications", | ||
"ip": "35.166.202.113", | ||
"user_agent": "unknown", | ||
"details": { | ||
"body": { | ||
"email": "[email protected]", | ||
"tenant": "dev-cu4jy2zgao6yx15x", | ||
"password": "dummyPassword", | ||
"client_id": "vQcJNDTxsM1W72eHFonRJdzyOvawlwIt", | ||
"connection": "Username-Password-Authentication" | ||
} | ||
}, | ||
"user_id": "", | ||
"user_name": "[email protected]", | ||
"strategy": "auth0", | ||
"strategy_type": "database", | ||
"log_id": "90020221031055712103169676686005480714681762668315934738" | ||
} | ||
}, | ||
"output": { | ||
"statusCode": 400, | ||
"error": "UserId is not present", | ||
"statTags": { | ||
"errorCategory": "dataValidation", | ||
"errorType": "instrumentation", | ||
"module": "source", | ||
"implementation": "native", | ||
"destinationId": "Non determinable", | ||
"workspaceId": "Non determinable" | ||
} | ||
} | ||
}, | ||
{ | ||
"description": "UserId is missing for all the requests in a batch", | ||
"input": [ | ||
{ | ||
"log_id": "90020221031055712103169676686005480714681762668315934738", | ||
"data": { | ||
"date": "2022-10-31T05:57:06.859Z", | ||
"type": "ss", | ||
"description": "", | ||
"connection": "Username-Password-Authentication", | ||
"connection_id": "con_djwCjiwyID0vZy1S", | ||
"client_id": "vQcJNDTxsM1W72eHFonRJdzyOvawlwIt", | ||
"client_name": "All Applications", | ||
"ip": "35.166.202.113", | ||
"user_agent": "unknown", | ||
"details": { | ||
"body": { | ||
"email": "[email protected]", | ||
"tenant": "dev-cu4jy2zgao6yx15x", | ||
"password": "dummyPassword", | ||
"client_id": "vQcJNDTxsM1W72eHFonRJdzyOvawlwIt", | ||
"connection": "Username-Password-Authentication" | ||
} | ||
}, | ||
"user_id": "", | ||
"user_name": "[email protected]", | ||
"strategy": "auth0", | ||
"strategy_type": "database", | ||
"log_id": "90020221031055712103169676686005480714681762668315934738" | ||
} | ||
}, | ||
{ | ||
"log_id": "90020221031055712103169676686007898566320991926665347090", | ||
"data": { | ||
"date": "2022-10-31T05:57:06.874Z", | ||
"type": "sapi", | ||
"description": "Create a User", | ||
"client_id": "vQcJNDTxsM1W72eHFonRJdzyOvawlwIt", | ||
"client_name": "", | ||
"ip": "35.166.202.113", | ||
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36", | ||
"log_id": "90020221031055712103169676686007898566320991926665347090" | ||
} | ||
} | ||
], | ||
"output": { | ||
"statusCode": 400, | ||
"error": "UserId is not present", | ||
"statTags": { | ||
"errorCategory": "dataValidation", | ||
"errorType": "instrumentation", | ||
"module": "source", | ||
"implementation": "native", | ||
"destinationId": "Non determinable", | ||
"workspaceId": "Non determinable" | ||
} | ||
} | ||
} | ||
] |