mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-16 05:00:24 +00:00
Handle error_response command in cowboy_metrics_h
This commit is contained in:
parent
473e3fb82b
commit
5ab5615ff0
3 changed files with 145 additions and 0 deletions
16
test/handlers/crash_h.erl
Normal file
16
test/handlers/crash_h.erl
Normal file
|
@ -0,0 +1,16 @@
|
|||
%% This module crashes immediately.
|
||||
|
||||
-module(crash_h).
|
||||
|
||||
-behaviour(cowboy_handler).
|
||||
|
||||
-export([init/2]).
|
||||
|
||||
-spec init(_, _) -> no_return().
|
||||
init(_, no_reply) ->
|
||||
ct_helper:ignore(?MODULE, init, 2),
|
||||
error(crash);
|
||||
init(Req, reply) ->
|
||||
_ = cowboy_req:reply(200, Req),
|
||||
ct_helper:ignore(?MODULE, init, 2),
|
||||
error(crash).
|
Loading…
Add table
Add a link
Reference in a new issue