Move the error response code into a separate function.
Move the error response code into a separate function.

yangchengjian/cowboy,callsign-core/cowboy_hybi00,noname007/cowboy,LineMetrics/cowboy,CrankWheel/cowboy,lpgauth/cowboy,callsign-core/cowboy_hybi00,binarin/cowboy,LineMetrics/cowboy,heroku/cowboyku,bsmr-erlang/cowboy,dangjun625/cowboy,acrispin/cowboy,Reimerei/cowboy,imdeps/cowboy,rabbitmq/cowboy,heroku/cowboy,layerhq/cowboy,odo/cowboy,nviennot/cowboy,layerhq/cowboy,binarin/cowboy,cad627/cowboy,yangchengjian/cowboy,essen/cowboy,essen/cowboy,manastech/cowboy,turtleDeng/cowboy,venkateshreddy/cowboy,K2InformaticsGmbH/cowboy,hairyhum/cowboy,piboye/cowboy,cad627/cowboy,ferd/cowboyku,276361270/cowboy,kivra/cowboy,sile/cowboy,omusico/cowboy,grahamrhay/cowboy,ninenines/cowboy,unisontech/cowboy,LineMetrics/cowboy,chef/cowboy,piboye/cowboy,heroku/cowboy,linearregression/cowboyku,lpgauth/cowboy,rbalint/pkg-erlang-cowboy,manastech/cowboy,pap/cowboy,MSch/cowboy,paulperegud/cowboy,unisontech/cowboy,bobos/ecweb