Skip to content

Commit 5bdbafa

Browse files
committed
change test params
1 parent 6917da0 commit 5bdbafa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/webhooks.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ describe("Get Webhook Test", () => {
2626

2727
describe("Verify Webhook test", () => {
2828
test("verify webhook signature", () => {
29-
const signature = "TzmTqUPhGiyHfKcpYoXePi/EVf0="
30-
const secret = "QK89mgP2v9KPGXVRp92IfYtHpbzrLpsjMp6sfWOPasQ="
31-
const payload = {"data":[{"id":"24","type":"application.created","attributes":{"createdAt":"2025-08-04T13:12:33.887Z","tags":{"key":"another-tag","test":"webhook-tag","number":"111"}},"relationships":{"application":{"data":{"id":"10006","type":"individualApplication"}}}}],"included":[{"id":"10006","type":"individualApplication","attributes":{"ssn":"663885441","tags":{"key":"another-tag","test":"webhook-tag","number":"111"},"email":"[email protected]","phone":{"number":"3476042441","countryCode":"1"},"status":"New","address":{"city":"Cedar Falls","state":"IA","street":"26 Cardinal Dr.","country":"US","postalCode":"50613"},"message":"Pre created application","archived":false,"fullName":{"last":"Mercado","first":"Cheryl"},"createdAt":"2025-08-04T13:12:33.887Z","maskedSSN":"*****5441","occupation":"Doctor","dateOfBirth":"1946-04-11","evaluationId":null,"decisionMethod":null,"decisionReason":null,"decisionUserId":null,"evaluationCodes":null,"evaluationScores":null,"evaluationOutcome":null,"evaluationEntityId":null,"soleProprietorship":false},"relationships":{"org":{"data":{"id":"2","type":"org"}}}}]}
29+
const signature = "UUNz8ch1Ovjg+ijXUEwlAlWEktU="
30+
const secret = "OB2HL5E3B4HJ7IVXRNL4YQKYIQIVJK36ZZLPZEFWZVSDSC7LLFJQ===="
31+
const payload = {"data":[{"id":"46306092","type":"application.approved","attributes":{"createdAt":"2025-08-05T06:48:38.957Z","tags":{"key":"another-tag","test":"webhook-tag","number":"111"}},"relationships":{"application":{"data":{"id":"3895367","type":"individualApplication"}},"customer":{"data":{"id":"3310133","type":"individualCustomer"}}}}]}
3232

3333
const verifyResult = unit.webhooks.verify(signature, secret, payload)
3434
expect(verifyResult).toBeTruthy()

types/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ export interface UnitErrorPayload {
519519
export const extractUnitError = (underlying: any): UnitError => {
520520
// for now, we only support extracting a UnitError from an axios error
521521
if (!underlying || !axiosStatic.isAxiosError(underlying) || !underlying.response) {
522-
return new UnitError(`Unknown Error - ${underlying.message}`, underlying)
522+
return new UnitError("Unknown Error", underlying)
523523
}
524524

525525
let message = `${underlying.response.status} - ${underlying.response.statusText ?? "Error"}`

0 commit comments

Comments
 (0)