docs icon indicating copy to clipboard operation
docs copied to clipboard

Bindings need to document error codes for expected behaviors

Open CodeMonkeyLeet opened this issue 4 years ago • 0 comments

What content needs to be created or modified?

Quoting Talal from Discord:

How is response handled when it comes to errors? When I return a response with status code 404, I expect the binding to remove the message from the Queue. But that doesnt happen. Is there some documentation or any sample code I can refer from?

Sorry I was wrong. It is removing them from the queue. But it would still be good to have some documentation where it says for which error codes it removes, and for which it will retry

The question was asked in reference to Azure Service Bus Queues bindings, but applies more broadly to the bindings components. Particularly for bindings that are analogous to pubsub components (e.g. Event Hubs, Kafka), there's generally an expectation that similar error handling is available (e.g. SUCCESS, RETRY, DROP as in the PubSub API) This will probably need to be on a per component basis as the semantics are too specific for the generic Bindings API.

Describe the solution you'd like

For components that support additional error semantics such as Service Bus Queues, which seems to behave similarly to the Azure Service Bus pubsub component (404 causes message to be dropped, others will cause retry)

Where should the new material be placed?

Under the appropriate binding component spec.

CodeMonkeyLeet avatar Jul 21 '21 22:07 CodeMonkeyLeet