code-corps / code-corps/code-corps-api

500 on request for favicon.ico on api subdomain

未關閉
#493 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug feature
主要語言
Elixir
星號
234
分支
82
PR 合併指標
30 天內沒有已合併 PR

描述

# 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

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。