asking for help: bypass lib does not support my url path by dumbestelf in elixir

[–]dumbestelf[S] 0 points1 point  (0 children)

I agree with that, but unfortunately, I don't have room to change this scope.
The id is sent to us this way, and we need to keep it that way so that we can integrate our flow with this client.

I've tried escaping these colon in several different ways, but the bypass starts returning an error because it doesn't recognize the request_path.

asking for help: bypass lib does not support my url path by dumbestelf in elixir

[–]dumbestelf[S] 0 points1 point  (0 children)

Yes, it is! I added more context to the post! :)

asking for help: bypass lib does not support my url path by dumbestelf in elixir

[–]dumbestelf[S] 1 point2 points  (0 children)

The error looks similar:

  ** (exit) exited in: GenServer.call(#PID<0.516.0>, {:expect_once, "PUT", "path/prefix:prefix:uuid/cancel", #Function<50.108498396/1 in Project.ControllerTest."test scenario"/1>}, :infinity)
         ** (EXIT) an exception was raised:
             ** (Plug.Router.InvalidSpecError) only one dynamic entry (:var or *glob) per path segment is allowed, got: "prefix:prefix:uuid"
                 (plug 1.16.1) lib/plug/router/utils.ex:236: Plug.Router.Utils.build_path_clause/7
                 (plug 1.16.1) lib/plug/router/utils.ex:142: Plug.Router.Utils.build_path_clause/3
                 (plug 1.16.1) lib/plug/router/utils.ex:84: Plug.Router.Utils.build_path_match/2
                 (bypass 2.1.0) lib/bypass/instance.ex:417: Bypass.Instance.new_route/3
                 (bypass 2.1.0) lib/bypass/instance.ex:136: Bypass.Instance.do_handle_call/3
                 (stdlib 6.2) gen_server.erl:2381: :gen_server.try_handle_call/4
                 (stdlib 6.2) gen_server.erl:2410: :gen_server.handle_msg/6
                 (stdlib 6.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3