Forum Discussion
Checking request status and using the result without doubling server calls
Hi v-yingjl,
Thank you for taking the time to answer.
The technique from the first video is using ManualStatusHandling, this is already what I’m doing (set in the options variable before calling my function). Then, we are both calling Value.Metadata to get the status code. The handling of the errors with a static table or custom code doesn’t change the fact that if the call is valid, I still need to call Text.FromBinary if I want to du something with the result. Calling Text.FromBinary and Value.Metadata causes the double call.
Any other idea?
To give more precision, if status code is not 200, the calling function will extract the error message and build a custom response base on both the message and static values. The retry loop show in the code is only to handle the rate limiting error 429.
Thanks again for trying!