data-api-builder
data-api-builder copied to clipboard
[Bug]: Error 400 when something is wrong with the connection string
What happened?
My connection string happened to have a random generated password that contains a semicolon (;) and the static web app would return an error 400 but no other data that could help with the problem. I've solved the issue by adding single quotes on the password field at the Link your database step but I think this can be addressed with code so that the single quotes are added by the code itself.
Version
v0.5.34
What database are you using?
Azure SQL
What hosting model are you using?
Static Web Apps (SWA)
Which API approach are you accessing DAB through?
GraphQL
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
hi @alexandruilea,
thanks for reporting the issue. @thomasgauvin, is this something that can be fixed on the SWA portal side?
An error message that would suggest the error better would be highly appreciated as error 400 in this case is pretty useless. Returning error 500 would already be an improvement over 400 as I was looking at what could be wrong with my request while the error came from the configuration of the backend.
On Sat, Jul 8, 2023, 00:36 Aniruddh Munde @.***> wrote:
hi @alexandruilea https://github.com/alexandruilea,
thanks for reporting the issue. @thomasgauvin https://github.com/thomasgauvin, is this something that can be fixed on the SWA portal side?
— Reply to this email directly, view it on GitHub https://github.com/Azure/data-api-builder/issues/1521#issuecomment-1626177639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP4Y2NDMDEBCHVDDCYM3LLXPB6N7ANCNFSM6AAAAAAYP3KEBI . You are receiving this because you were mentioned.Message ID: @.***>
@Aniruddh25, thanks for tagging, I'll coordinate with Portal & database teams to get this fixed to escape characters in the connection string