Happy Business Starts Here

Why 401 was recorded in my server log while all callouts in notification history show succeeded?

Highlighted
Support SME

Why 401 was recorded in my server log while all callouts in notification history show succeeded?

We have configured callout notifications in our Zuora tenant to trigger requests to our server

Screen Shot 2019-05-24 at 2.35.15 PM.png

The callouts are working fine and we could see all callout in the notification history shows succeeded.

Screen Shot 2019-05-24 at 2.28.41 PM.png

But when I check our server log, I could see many records of rejecting Zuora callout requests with error 401 Unauthorized while I can find any from the notification history.

 

Why is that happening?






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

2 REPLIES 2
Support SME

Re: Why 401 was recorded in my server log while all callouts in notification history show succeeded?

The behavior observed is the expected behavior.

 

Zuora's callout authentication was implemented following RFC 2617 and RFC 7235. (the original documentation that defined Basic Auth)

 

So the Basic Auth follows a "challenge-response" mechanism, which means it requires the first request to the server to be sent without credentials. After receiving 401 Unauthorized error from the server, a second request should then be sent out with encoded credentials. 

 

So the 401 Unauthorized error you observed are the result of our 1st attempts which were sent without a credential and then the 2nd attempts were sent with credentials so the notification history is showing succeeded results.

 

(Please be noted that the 1st attempt without a credential and 2nd attempt with credential are 2 separate requests which are considered as 1 attempt visible to the user, which means the 401 error returned for the 1st attempt will not be counted in the Maximum Number of Delivery Attempts configured for Callout Retry rules)

 

[ref: RFC 2617 Section 1.2 ]






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Support SME

Re: Why 401 was recorded in my server log while all callouts in notification history show succeeded?

Here is a newly added document page to explain our callout Basic Auth in detail:

https://knowledgecenter.zuora.com/CF_Users_and_Administrators/Notifications/E_Configure_Callout_Noti...






If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √