openAIP / openaip

Public issue tracker of www.openaip.net.
39 stars 3 forks source link

Error: Failed to write file to bucket: Cannot read properties of undefined (reading 'unit') TypeError: C... #348

Closed sentry-io[bot] closed 2 months ago

sentry-io[bot] commented 2 months ago

Sentry Issue: CORE-API-5N

Error: Failed to write file to bucket: Cannot read properties of undefined (reading 'unit') TypeError: Cannot read properties of undefined (reading 'unit')
    at toVerticalExtentMeters (/usr/src/app/models/rc-airfield/rc-airfield-model.js:119:25)
    at rc...
  File "/usr/src/app/models/rc-airfield/rc-airfield-model.js", line 119, in toVerticalExtentMeters
    if (altitudeObj.unit === uom.FEET) {
  File "/usr/src/app/models/rc-airfield/rc-airfield-model.js", line 124, in rcAirfieldSchema.methods.toAirspace
    const defaultOptions = { radius: RADIUS, verticalExtent: toVerticalExtentMeters(this.maxPermittedAltitude) };
  File "/usr/src/app/modules/exports/data-transformers/rc-airfield-airspace/json-to-openair-extended-data-transformer.js", line 74, in JsonToOpenairExtendedDataTransformer.transform
    const airspace = airfield.toAirspace({ radius: this.radius, verticalExtent: this.verticalExtent });
  File "/usr/src/app/modules/exports/download-export.js", line 120, in DownloadExport.fromIterator
    if (!writeStream.write(await this.dataTransformer.transform(sourceTransform, idx))) {
  File "/usr/src/app/controllers/export-controller.js", line 215, in runSystemExportJob
    const signedUrl = await exportHandler.createExport({ country, format, contentType });
...
(4 additional frame(s) were not displayed)
reskume commented 2 months ago

Fixed with current release