Add try block for json requests