You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When database errors that aren't "row not found" errors, it should return a 5xx error
Current Behavior
Currently, in the case that the database is removed from behind a running instance of flagr (network connection, password change, etc) the application returns a 404 to a GET request on localhost:13480/api/v1/flags/1000
Possible Solution
Adjust the code to check for RecordNotFound errors and return 404s in that case; PR incoming
Steps to Reproduce (for bugs)
Instantiate instance of flagr running against database (postgres, in my case)
Remove the ability for flagr to connect to the database (stop the instance, change the user password, etc)
do a GET on localhost:13480/api/v1/flags/1000 or any other flag
Get a 404, even if the flag does exist (but is just inaccessible)
Context
Noticed this when loadtesting a cluster in AWS, that when the database would peak its CPU and requests to it timed out that the application would return 404s instead of 5xxs as expeted
Your Environment
Version used (flagr version): 1.15
Server type and version: aws/ECS Fargate
Operating System and version (uname -a):
Link to your project:
The text was updated successfully, but these errors were encountered:
Expected Behavior
When database errors that aren't "row not found" errors, it should return a 5xx error
Current Behavior
Currently, in the case that the database is removed from behind a running instance of flagr (network connection, password change, etc) the application returns a 404 to a GET request on
localhost:13480/api/v1/flags/1000
Possible Solution
Adjust the code to check for RecordNotFound errors and return 404s in that case; PR incoming
Steps to Reproduce (for bugs)
localhost:13480/api/v1/flags/1000
or any other flagContext
Noticed this when loadtesting a cluster in AWS, that when the database would peak its CPU and requests to it timed out that the application would return 404s instead of 5xxs as expeted
Your Environment
flagr version
): 1.15uname -a
):The text was updated successfully, but these errors were encountered: