I think you need fix indent of the case.
You can see example: [here] (https://github.com/extend/cowboy/blob/master/src/cowboy_req.erl#L235) and [here] (https://github.com/extend/cowboy/blob/master/src/cowboy_rest.erl#L422)