You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you upload a file to a page that gets redirected by the 404 handler, you get a function clause error in boss_web_controller_handle_request:process_result
#657
Open
RobertSwirsky opened this issue
Oct 11, 2016
· 0 comments
There will be a crash in boss_web_controller_handle_request:process_result because there's no matching function clause.
I added a catch-all at the end to see what we're getting:
% [ ... lots of clauses before this one ... ]
process_result(_, _, {StatusCode, Payload, Headers}) when is_integer(StatusCode) ->
{StatusCode, boss_web_controller:merge_headers(Headers, [{"Content-Type", "text/html"}]), Payload};
process_result(_, _, X) ->
lager:info("process_result! I have no idea: ~p", [X]).
And we got this output:
18:40:43.814 [info] process_result! I have no idea: {{ok,"Go Away",[]},undefined,[]}
The problem is those two extra params after the 3-element tuple aren't matched by any existing function header.
You'll have the same problem if the POST handler returned {json, []} or {ok, []} too.
The text was updated successfully, but these errors were encountered:
Here's what happens:
Here's my route
And this is the unlogged controller.
There will be a crash in boss_web_controller_handle_request:process_result because there's no matching function clause.
I added a catch-all at the end to see what we're getting:
And we got this output:
18:40:43.814 [info] process_result! I have no idea: {{ok,"Go Away",[]},undefined,[]}
The problem is those two extra params after the 3-element tuple aren't matched by any existing function header.
You'll have the same problem if the POST handler returned
{json, []}
or {ok, []}
too.The text was updated successfully, but these errors were encountered: