Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using new! in case of nested errors raises without reporting the actual error #251

Closed
fabriziosestito opened this issue Mar 28, 2022 · 1 comment · Fixed by #252
Closed

Comments

@fabriziosestito
Copy link
Member

Consider bubbling up the whole changeset or use this: https://hexdocs.pm/ecto/Ecto.Changeset.html#traverse_errors/2

@arbulu89
Copy link
Contributor

Here an example of the error output:

[error] #PID<0.4901.0> running TrentoWeb.Endpoint (connection #PID<0.4869.0>, stream id 5) terminated
Server: localhost:4000 (http)
Request: GET /api/checks/catalog
** (exit) an exception was raised:
    ** (RuntimeError) got [] while retrieving Exception.message/1 for %RuntimeError{message: []} (expected a string)
        lib/trento/application/integration/checks/models/catalog.ex:10: Trento.Integration.Checks.Models.Catalog.new!/1
        (trento 0.1.0) lib/trento/application/integration/checks/adapter/mock_runner.ex:71: Trento.Integration.Checks.MockRunner.get_catalog/1
        (trento 0.1.0) lib/trento_web/controllers/catalog_controller.ex:9: TrentoWeb.CatalogController.checks_catalog/2
        (trento 0.1.0) lib/trento_web/controllers/catalog_controller.ex:1: TrentoWeb.CatalogController.action/2
        (trento 0.1.0) lib/trento_web/controllers/catalog_controller.ex:1: TrentoWeb.CatalogController.phoenix_controller_pipeline/2
        (phoenix 1.6.6) lib/phoenix/router.ex:355: Phoenix.Router.__call__/2
        (trento 0.1.0) lib/trento_web/endpoint.ex:1: TrentoWeb.Endpoint.plug_builder_call/2
        (trento 0.1.0) lib/plug/debugger.ex:136: TrentoWeb.Endpoint."call (overridable 3)"/2
        (trento 0.1.0) lib/trento_web/endpoint.ex:1: TrentoWeb.Endpoint.call/2
        (phoenix 1.6.6) lib/phoenix/endpoint/cowboy2_handler.ex:54: Phoenix.Endpoint.Cowboy2Handler.init/4
        (cowboy 2.9.0) /home/xarbulu/Workspace/sap_squad/trento-stack/web/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.9.0) /home/xarbulu/Workspace/sap_squad/trento-stack/web/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3
        (cowboy 2.9.0) /home/xarbulu/Workspace/sap_squad/trento-stack/web/deps/cowboy/src/cowboy_stream_h.erl:295: :cowboy_stream_h.request_process/3
        (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants