Skip to content
Snippets Groups Projects
Unverified Commit 68d9dcd4 authored by trwnh's avatar trwnh Committed by GitHub
Browse files

Fix uncaught 500 error on invalid `replies_policy` (Fix #19097) (#20126)

parent c989faaa
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@ class Api::V1::ListsController < Api::BaseController
before_action :require_user!
before_action :set_list, except: [:index, :create]
rescue_from ArgumentError do |e|
render json: { error: e.to_s }, status: 422
end
def index
@lists = List.where(account: current_account).all
render json: @lists, each_serializer: REST::ListSerializer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment