# Go client handler throwing 500 server error metric consistency issue

**URL:** <https://discuss.prometheus.io/t/go-client-handler-throwing-500-server-error-metric-consistency-issue/1088>\
**Category:** Instrumenting Applications / Creating Exporters\
**Created:** [July 16, 2022, 11:42am UTC](https://discuss.prometheus.io/t/go-client-handler-throwing-500-server-error-metric-consistency-issue/1088 "2022-07-16T11:42:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geet](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/geet/32/476_2.png) [@geet](https://discuss.prometheus.io/u/geet)\
**Post date:** [July 16, 2022, 11:42am UTC](https://discuss.prometheus.io/t/go-client-handler-throwing-500-server-error-metric-consistency-issue/1088/1 "2022-07-16T11:42:24Z")

</div>

I am instrumenting application metrics using the prometheus go client.  
I am using the prometheus handler to expose the metrics.

> Blockquote  
> import (

“[github.com/gofiber/adaptor/v2](http://github.com/gofiber/adaptor/v2)”  
“[github.com/prometheus/client\_golang/prometheus/promhttp](http://github.com/prometheus/client_golang/prometheus/promhttp)”

)

func MetricsRoutes(api fiber.Router) {

api.Get(“/metrics”, adaptor.HTTPHandler(promhttp.Handler()))

}

On scrape from prometheus, the target starts throwing 500 server error after a few scrapes. This happens only in some environments.  
when i tried to hit the /metrics endpoint, i got the following error.  
\<metric\_name\> was collected before with the same name and label values

I understand that the go client is throwing it while checking for metric consistency but no clue of why its happening? It works fine in my local environment
