Blake Erickson
6ac3f1f7b5
DEV: Return 400 instead of 500 for invalid top period ( #13828 )
...
* DEV: Return 400 instead of 500 for invalid top period
This change will prevent a fatal 500 error when passing in an invalid
period param value to the `/top` route.
* Check if the method exists first
I couldn't get `ListController.respond_to?` to work, but was still able
to check if the method exists with
`ListController.action_methods.include?`. This way we can avoid relying
on the `NoMethodError` exception which may be raised during the course
of executing the method.
* Just check if the period param value is valid
* Use the new TopTopic.validate_period method
2021-07-23 14:58:10 -06:00
..
2021-07-15 05:53:26 +03:00
2021-07-01 09:44:58 -03:00
2020-05-23 00:56:13 -04:00
2021-06-22 13:00:04 -05:00
2021-03-17 08:55:23 +03:00
2021-03-22 09:50:22 +10:00
2021-07-02 16:43:10 +02:00
2021-07-21 12:32:07 +08:00
2019-10-02 14:01:53 +10:00
2020-04-02 11:16:38 -04:00
2021-06-22 13:00:04 -05:00
2021-06-29 14:43:38 -05:00
2021-01-27 10:29:24 -06:00
2020-09-29 22:29:03 +05:30
2020-03-23 11:30:40 +00:00
2021-06-23 14:55:17 -05:00
2020-08-03 16:59:54 +10:00
2021-07-23 14:24:44 -04:00
2019-10-08 14:15:08 +03:00
2020-08-28 11:46:53 -07:00
2020-10-09 12:51:24 +01:00
2019-12-10 11:48:39 +11:00
2021-03-15 15:41:59 +11:00
2021-07-22 20:14:18 +04:00
2020-07-13 19:13:17 +03:00
2021-01-29 07:44:49 +05:30
2020-02-12 12:11:28 +02:00
2021-07-21 17:03:04 +10:00
2021-07-23 14:58:10 -06:00
2021-04-21 12:36:32 +03:00
2020-07-22 09:22:26 +08:00
2020-10-22 12:50:22 +08:00
2020-03-23 16:31:07 -07:00
2020-11-05 12:18:26 -05:00
2021-03-11 08:21:24 -03:00
2019-12-03 11:32:45 -03:00
2021-07-08 10:46:21 +03:00
2020-11-06 10:33:19 +10:00
2021-07-21 15:21:09 -04:00
2020-07-14 12:36:19 -04:00
2021-05-26 09:47:35 +10:00
2021-03-11 09:36:49 -05:00
2020-02-28 10:53:11 +00:00
2020-11-09 16:46:52 +11:00
2021-07-20 14:42:08 +04:00
2020-07-24 10:43:09 +08:00
2020-10-13 16:17:06 +03:00
2021-04-21 12:36:32 +03:00
2019-10-02 14:01:53 +10:00
2021-07-15 12:52:40 -04:00
2021-06-30 11:25:05 +08:00
2021-04-21 19:15:53 +02:00
2021-07-23 14:24:44 -04:00
2021-04-28 23:12:08 +03:00
2021-06-24 11:35:36 +02:00
2021-07-13 12:22:00 +10:00
2019-09-09 11:03:57 -04:00
2021-02-08 10:04:33 +00:00
2021-01-29 07:44:49 +05:30
2021-07-16 11:13:00 +08:00
2021-07-21 09:14:53 -04:00
2021-05-21 11:43:47 +10:00
2020-08-12 10:16:26 +10:00
2019-10-02 14:01:53 +10:00