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

Authorization Failed: %Protocol.UndefinedError{description: "", protocol: Enumerable, value: %Plug.Conn.Unfetched{aspect: :query_params #1

Open
retf opened this issue Apr 8, 2020 · 0 comments

Comments

@retf
Copy link

retf commented Apr 8, 2020

I am tring use with maru (https://maru.readme.io/docs), but when I send signed request, I get this error:

%HTTPoison.Response{
body: "Authorization Failed: %Protocol.UndefinedError{description: "", protocol: Enumerable, value: %Plug.Conn.Unfetched{aspect: :query_params}}",
headers: [
{"access-control-allow-origin", "*"},
{"cache-control", "max-age=0, private, must-revalidate"},
{"content-length", "137"},
{"date", "Wed, 08 Apr 2020 17:20:05 GMT"},
{"server", "Cowboy"}
],

Any idea?

PLUG:

defmodule Fintech.API do

use Fintech.Server
use Maru.Router
plug PlugSigaws
plug Plug.Logger

before do
plug Plug.Static, at: "/", from: List.to_string(:code.priv_dir(:fintech)) <> "/www"
end

plug Plug.Parsers,
pass: ["/"],
json_decoder: Jason,
parsers: [PlugSigaws.Parsers.JSON, PlugSigaws.Parsers.URLENCODED, :urlencoded, :json, :multipart]

maru

use Maru.Router
version("v1")

get do
conn |> text("It works !")
end

...

...

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

No branches or pull requests

1 participant