-
Notifications
You must be signed in to change notification settings - Fork 75
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
no function clause matching in anonymous fn/2 in Plug.Conn.merge_resp_headers/2 #41
Comments
I could be wrong, is that related to this commit? |
Hey @zhhz sorry for the late reply. It looks like you're trying to pass an empty list to Can you please post a code snipper here showing how you configured the plug? Thanks, |
@mschae I have this config in my endpoint:
and most of my tests are failing this is the error message:
|
@slashmili Sorry to hear it. I'm a bit stumped, it looks like the expose headers option is a list. This line however should prohibit that: The only real explanation I have at this point is that the plug wasn't properly initiated. Can you create an example project with a failing test somewhere? Thanks |
@slashmili I encounter the same issue.
and everything started to work fine BTW, Same error wasn't because of the This was the original
Then frontend developer notified me that the |
I somehow managed to fix the problem, I forgot to report it back. I don't recall the details but I guess I did something wrong 😆 |
I'll close this for now. |
After upgrade to 1.4.0, my console spits the error:
Server: localhost:4000 (http)
Request: OPTIONS /graphql
** (exit) an exception was raised:
** (FunctionClauseError) no function clause matching in anonymous fn/2 in Plug.Conn.merge_resp_headers/2
(plug) lib/plug/conn.ex:663: anonymous fn({"access-control-expose-headers", []}, [{"cache-control", "max-age=0, private, must-revalidate"}, {"x-request-id", "s83p1st550ks4i88vkahrdlopo2nk6am"}, {"vary", "Origin"}, {"access-control-allow-origin", "http://localhost:3000"}]) in Plug.Conn.merge_resp_headers/2
(elixir) lib/enum.ex:1811: Enum."-reduce/3-lists^foldl/2-0-"/3
(plug) lib/plug/conn.ex:663: Plug.Conn.merge_resp_headers/2
(cors_plug) lib/cors_plug.ex:33: CORSPlug.call/2
I'm very new to elixir, so am not sure if this related to this plug.
Thanks.
The text was updated successfully, but these errors were encountered: