mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 13:08:12 +08:00
improve handling of non-finite floating point values (#490)
* improve HTTP error reporting * generate standards-compatible JSON * add --nan-to-num work-around for non-finite floating point values * lint * update tests * correctly set Infinities to min/max * REAMDE update for --nan-to-num * define constant for repetitive warning message * clarify where NaN errors will occure
This commit is contained in:
@@ -38,7 +38,11 @@ export const doJsonRequest = async url => {
|
||||
return res.json();
|
||||
}
|
||||
// else an error
|
||||
const msg = `Unexpected HTTP response ${res.status}, ${res.statusText}`;
|
||||
let msg = `Unexpected HTTP response ${res.status}, ${res.statusText}`;
|
||||
const body = await res.text();
|
||||
if (body && body.length > 0) {
|
||||
msg = `${msg} -- ${body}`;
|
||||
}
|
||||
dispatchNetworkErrorMessageToUser(msg);
|
||||
throw new Error(msg);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user