mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
fix(OSM): error handling
This commit is contained in:
parent
4ab36f331a
commit
51583c8925
|
|
@ -341,6 +341,7 @@ export class DockerService {
|
|||
});
|
||||
|
||||
this._broadcast(DockerService.OPENSTREETMAP_IMPORT_SERVICE_NAME, 'importing', `Processing initial import of OSM data. This may take some time...`);
|
||||
await disk.put(LOG_PATH, 'Beginning OpenStreetMap data import...\n');
|
||||
|
||||
const container = await this.docker.createContainer({
|
||||
Image: image,
|
||||
|
|
@ -364,6 +365,10 @@ export class DockerService {
|
|||
const data = await container.wait();
|
||||
logger.debug(`OpenStreetMap data import result: ${JSON.stringify(data)}`);
|
||||
|
||||
if (data.StatusCode !== 0) {
|
||||
throw new Error(`OpenStreetMap data import failed with status code ${data.StatusCode}. Check the log file at ${LOG_PATH} for details.`);
|
||||
}
|
||||
|
||||
await container.remove();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user