Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Some string combinations in varchar(1024) field + SWA + DAB gives http 500. #2496

Open
1 task done
vmtornikoski opened this issue Dec 16, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working swa Issue is on the swa, swa cli side triage issues to be triaged

Comments

@vmtornikoski
Copy link

What happened?

A bug happened!

Version

1.1.7, indicated by swa start logs, although dab --version states 1.3.19

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

If SQL contains a field of type varchar(1024) with contents that have curly brace, e.g: [{"name":"temperature","value":14.85},{"name":"rssi","value":-117},{"name":"spfact","value":12}],
internal server error (500) is returned when a static web app tries to access that data through DAB GraphQL.

For some reason, insomnia manages to access and return same data without problems, from the same api address of http://localhost:4280/data-api/graphql.

SWA CLI version is 2.0.1

Code of Conduct

  • I agree to follow this project's Code of Conduct
@vmtornikoski vmtornikoski added bug Something isn't working triage issues to be triaged labels Dec 16, 2024
@vmtornikoski vmtornikoski changed the title [Bug]: Curly brace in SQL varchar(1024) field + SWA + DAB gives http 500. [Bug]: Some string combinations in varchar(1024) field + SWA + DAB gives http 500. Dec 16, 2024
@vmtornikoski
Copy link
Author

For example, this string gives error:
[{"name":"water_depth","value":2109},{"name":"pressure","value":20620},{"name":"temperature","value":6},{"name":"battery_voltage","value":3.116},{"name":"rssi","value":-115}, {"name": "test", "value": 123}]

Haven't found a logic for error yet, in string length or contents etc.

@abhishekkumams abhishekkumams added the swa Issue is on the swa, swa cli side label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working swa Issue is on the swa, swa cli side triage issues to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants