Crash when add reaction emoji on just deleted status
Environment
- Pleroma version: 2.0.5 and 2.0.7-9
- Elixir version: 1.10.3
- Operating system: linux (android, termux)
- PostgreSQL version: 12.3
Bug description
Maybe this is not very important, but the Endpoint terminated:
23:30:39.814 [error] request_id=Fhm9cb1BxH8AH8gBBH5h Couldn't refresh https://…: {:error, {:error, "Object has been deleted"}}
23:31:23.858 [error] request_id=Fhm9fBJSMxtAA7YA_THC Internal server error: %RuntimeError{message: "expected action/2 to return a Plug.Conn, all plugs must receive a connection (conn) and return a connection, got: {:error, \"Could not add reaction emoji\"}"}
23:17:53.139 [info] request_id=Fhm8v07fyTWDFm4BBDzh Converted error RuntimeError to 500 response
23:17:53.202 [error] #PID<0.23684.5> running Pleroma.Web.Endpoint (connection #PID<0.23683.5>, stream id 1) terminated
** (exit) an exception was raised:
** (RuntimeError) expected action/2 to return a Plug.Conn, all plugs must receive a connection (conn) and return a connection, got: {:error, "Could not add reaction emoji"}
(pleroma 2.0.5-v-dev) lib/pleroma/web/pleroma_api/controllers/pleroma_api_controller.ex:5: Pleroma.Web.PleromaAPI.PleromaAPIController.phoenix_controller_pipeline/2
(pleroma 2.0.5-v-dev) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.instrument/4
(phoenix 1.4.13) lib/phoenix/router.ex:288: Phoenix.Router.__call__/2
(pleroma 2.0.5-v-dev) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.plug_builder_call/2
(pleroma 2.0.5-v-dev) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.call/2
(phoenix 1.4.13) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
(cowboy 2.7.0) /data/data/com.termux/files/home/pleroma/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
(cowboy 2.7.0) /data/data/com.termux/files/home/pleroma/deps/cowboy/src/cowboy_stream_h.erl:320: :cowboy_stream_h.execute/3