Catch exception when address is invalid
I am importing events from an external source to a Mobilizon instance. When posting an event via graphql, the given PhysicalAddress is not checked for validity. When the event is then published (it is initially posted as draft) an exception is raised when accessing the event url:
Request: GET /events/e6a4acfd-e0d8-456d-8dba-3060ec447c6b
** (exit) an exception was raised:
** (ArgumentError) Invalid address
(mobilizon 2.0.2) lib/service/address/address.ex:25: Mobilizon.Service.Address.render_address/1
(mobilizon 2.0.2) lib/service/metadata/event.ex:153: Mobilizon.Service.Metadata.Mobilizon.Events.Event.maybe_build_address/2
(mobilizon 2.0.2) lib/service/metadata/event.ex:127: Mobilizon.Service.Metadata.Mobilizon.Events.Event.description/2
(mobilizon 2.0.2) lib/service/metadata/event.ex:15: Mobilizon.Service.Metadata.Mobilizon.Events.Event.build_tags/2
(mobilizon 2.0.2) lib/web/views/page_view.ex:69: Mobilizon.Web.PageView.render/2
(phoenix_view 1.0.0) lib/phoenix/view.ex:435: Phoenix.View.render_to_iodata/3
(phoenix 1.6.5) lib/phoenix/controller.ex:772: Phoenix.Controller.render_and_send/4
(mobilizon 2.0.2) lib/web/controllers/page_controller.ex:1: Mobilizon.Web.PageController.action/2
I think the event should still be accessible, even if it contains an Invalid address.