Write errors to srderr on 5XX responses

@maxfliri
@gtrogers