PLT-5379 Fix the error occuring while fetching OG metadata for links which don't exist. (#5308)

This commit is contained in:
Debanshu Kundu
2017-02-07 20:56:14 +05:30
committed by enahum
parent 439d5b7ed7
commit 5cc30fa061
2 changed files with 2 additions and 1 deletions

View File

@@ -444,6 +444,7 @@ func getOpenGraphMetadata(c *Context, w http.ResponseWriter, r *http.Request) {
ogJson, err := og.ToJSON()
if err != nil {
w.Write([]byte(`{"url": ""}`))
return
}
w.Write(ogJson)
}