Questions for DAB #1826
Replies: 3 comments 3 replies
-
I'm surprised that no reply yet. As shown below, I have a stored proc that leverages rich Json capability in Azure SQL: My hope is that I can leverage DAB to expose this as a customer-facing REST API. I need the ability to surface custom message ( most cases are complex validation messages when doing PUT/PATCH) . |
Beta Was this translation helpful? Give feedback.
-
@yorek , hope this is possible? |
Beta Was this translation helpful? Give feedback.
-
Hi @qiaohaojie , Thank you for reaching and sorry about the delay in response. My answers to your questions:
|
Beta Was this translation helpful? Give feedback.
-
DAB is exciting!
Some questions:
Where and how do I specify custom status_code and exception messages in DAB? For example, I have a stored proc to read data and I want to return status_code 404 if the data not found. And in writing scenario, if my stored proc detect validation error, I want to return status_code 500 (Internal Error; or maybe even more customised user friendly message).
How to I protect the exposed DAB REST end point? How do I provide features like rate limiting, IP restriction etc? Also, as mentioned in question 1, if I can use custom status_code and exception message, how can I pass this to API gateway?
My initial thought might be sth like: client --> Azure API management --> DAB --> Azure SQL (stored proc). Let's say my stored proc decides to return status_code 400 (bad request) with exception message ("input value can not be less than 100"). How my store proc to pass to DAB, and DAB pass to Azure API management, so that at the end, the client will receive this 400 error with the exception message?
Beta Was this translation helpful? Give feedback.
All reactions