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
Hi huacnlee, Thanks for your gem, it's quite handy, But there is a potential issue here.
In the code here https://github.com/huacnlee/rails-settings-cached/blob/main/lib/rails-settings/base.rb#L157
the method will rescue all the errors.
It would be very bad if the application can't read the correct settings either because of timeout or something else and then get the default value instead, since these settings could be used to control the business flow, the default value could be very different from the production one.
I suggest just rescue specific errors such as "DB not exist" to let it go through the migration step and expose other errors to the application.
The text was updated successfully, but these errors were encountered:
Hi huacnlee, Thanks for your gem, it's quite handy, But there is a potential issue here.
In the code here
https://github.com/huacnlee/rails-settings-cached/blob/main/lib/rails-settings/base.rb#L157
the method will rescue all the errors.
It would be very bad if the application can't read the correct settings either because of timeout or something else and then get the default value instead, since these settings could be used to control the business flow, the default value could be very different from the production one.
I suggest just rescue specific errors such as "DB not exist" to let it go through the migration step and expose other errors to the application.
The text was updated successfully, but these errors were encountered: