mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixed error handling, and error logging for panel rendering
This commit is contained in:
@@ -20,10 +20,11 @@ func RenderToPng(c *middleware.Context) {
|
||||
}
|
||||
|
||||
renderOpts.Url = "http://localhost:3000/" + renderOpts.Url
|
||||
|
||||
pngPath, err := renderer.RenderToPng(renderOpts)
|
||||
|
||||
if err != nil {
|
||||
c.HTML(500, "error.html", nil)
|
||||
c.Handle(500, "Failed to render to png", err)
|
||||
return
|
||||
}
|
||||
|
||||
c.Resp.Header().Set("Content-Type", "image/png")
|
||||
|
||||
Reference in New Issue
Block a user