Add error codes to our custom errors (#959)

This commit is contained in:
Fábio Rosado
2022-11-25 17:04:10 +00:00
committed by GitHub
parent 30e31a86ef
commit b062efcf17
20 changed files with 306 additions and 67 deletions

View File

@@ -1,6 +1,7 @@
import type { Runtime } from '../runtime';
import type { PyProxy } from 'pyodide';
import { getLogger } from '../logger';
import { robustFetch } from '../fetch';
const logger = getLogger('py-register-widget');
@@ -92,7 +93,7 @@ export function make_PyWidget(runtime: Runtime) {
}
async getSourceFromFile(s: string): Promise<string> {
const response = await fetch(s);
const response = await robustFetch(s);
return await response.text();
}
}