From 5cc30fa06149e1291deed6f53de53ecf25600d2c Mon Sep 17 00:00:00 2001 From: Debanshu Kundu Date: Tue, 7 Feb 2017 20:56:14 +0530 Subject: PLT-5379 Fix the error occuring while fetching OG metadata for links which don't exist. (#5308) --- api/post.go | 1 + 1 file changed, 1 insertion(+) (limited to 'api/post.go') diff --git a/api/post.go b/api/post.go index 4d1425c18..d9531b09a 100644 --- a/api/post.go +++ b/api/post.go @@ -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) } -- cgit v1.2.3-1-g7c22