Skip to content

500 on request for favicon.ico on api subdomain #493

Open
@joshsmith

Description

@joshsmith

Problem

We're getting a 500 on requesting the favicon on the api. subdomain.

Nov 27 10:39:34 code-corps app/web.1:  Server: api.codecorps.org:80 (http) 
Nov 27 10:39:34 code-corps app/web.1:  Request: GET /favicon.ico 
Nov 27 10:39:34 code-corps app/web.1:  ** (exit) an exception was raised: 
Nov 27 10:39:34 code-corps app/web.1:      ** (FunctionClauseError) no function clause matching in Phoenix.Template.HTML.encode_to_iodata!/1 
Nov 27 10:39:34 code-corps app/web.1:          (phoenix) lib/phoenix/template/html.ex:12: Phoenix.Template.HTML.encode_to_iodata!(%{errors: [%{id: "INTERNAL_SERVER_ERROR", status: 500, title: "500 Internal server error"}]}) 
Nov 27 10:39:34 code-corps app/web.1:          (phoenix) lib/phoenix/controller.ex:642: Phoenix.Controller.do_render/4 
Nov 27 10:39:34 code-corps app/web.1:          (phoenix) lib/phoenix/endpoint/render_errors.ex:58: Phoenix.Endpoint.RenderErrors.__catch__/5 
Nov 27 10:39:34 code-corps app/web.1:          (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4 
Nov 27 10:39:34 code-corps app/web.1:          (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4 

Subtasks

  • Need to figure out a consistent way to handle these kinds of requests when we don't accept non-JSON API requests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions