@defra/bng-errors-lib 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/errors.js +15 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/bng-errors-lib",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Custom errors for Biodiversity Net Gain",
@@ -15,5 +15,5 @@
15
15
  },
16
16
  "author": "Department for Environment, Food and Rural Affairs <https://www.gov.uk/government/organisations/department-for-environment-food-rural-affairs>",
17
17
  "license": "OGL-UK-3.0",
18
- "gitHead": "708a394e4fc4590667907c654ba913cb3a94310c"
18
+ "gitHead": "970c23b4d158102f6161df704dc447a960835908"
19
19
  }
package/src/errors.js CHANGED
@@ -3,4 +3,18 @@ import ThreatScreeningError from './threat-screening-error.js'
3
3
  import UploadTypeValidationError from './upload-type-validation-error.js'
4
4
  import ValidationError from './validation-error.js'
5
5
 
6
- export { CoordinateSystemValidationError, ThreatScreeningError, UploadTypeValidationError, ValidationError }
6
+ const INVALID_COORDINATE_SYSTEM = 'INVALID-COORDINATE-SYSTEM'
7
+ const INVALID_FEATURE_COUNT = 'INVALID-FEATURE-COUNT'
8
+ const INVALID_LAYER_COUNT = 'INVALID-LAYER-COUNT'
9
+ const INVALID_UPLOAD = 'INVALID-UPLOAD'
10
+ const MISSING_COORDINATE_SYSTEM = 'MISSING-COORDINATE-SYSTEM'
11
+
12
+ const uploadGeospatialLandBoundaryErrorCodes = Object.freeze({
13
+ INVALID_COORDINATE_SYSTEM,
14
+ INVALID_FEATURE_COUNT,
15
+ INVALID_LAYER_COUNT,
16
+ INVALID_UPLOAD,
17
+ MISSING_COORDINATE_SYSTEM
18
+ })
19
+
20
+ export { CoordinateSystemValidationError, ThreatScreeningError, UploadTypeValidationError, ValidationError, uploadGeospatialLandBoundaryErrorCodes }