syncano-server
Advanced tools
Comparing version 0.7.2-10 to 0.7.2-11
@@ -26,3 +26,7 @@ 'use strict'; | ||
function parseJSON(response) { | ||
return response.json(); | ||
try { | ||
return response.json(); | ||
} catch (err) { | ||
return response.text(); | ||
} | ||
} | ||
@@ -29,0 +33,0 @@ |
{ | ||
"name": "syncano-server", | ||
"version": "0.7.2-10", | ||
"version": "0.7.2-11", | ||
"description": "A library to intereact with the Syncano API on a server side", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -16,3 +16,7 @@ import {getHost, SYNCANO_API_VERSION} from './settings' | ||
export function parseJSON(response) { | ||
return response.json() | ||
try { | ||
return response.json() | ||
} catch (err) { | ||
return response.text() | ||
} | ||
} | ||
@@ -19,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
447268
1623