File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [ Unreleased]
8
8
9
+ ### Fixed
10
+
11
+ - Return a better error message if issues with reading batch job results occur in ` Job.getResultsAsStac `
12
+
9
13
## [ 2.0.1] - 2021-07-14
10
14
11
15
### Fixed
@@ -122,4 +126,4 @@ All prior releases have been documented in the [GitHub Releases](https://github.
122
126
[ 1.0.3 ] : https://github.com/Open-EO/openeo-js-client/compare/v1.0.2...v1.0.3
123
127
[ 1.0.2 ] : https://github.com/Open-EO/openeo-js-client/compare/v1.0.1...v1.0.2
124
128
[ 1.0.1 ] : https://github.com/Open-EO/openeo-js-client/compare/v1.0.0...v1.0.1
125
- [ 1.0.0 ] : https://github.com/Open-EO/openeo-js-client/compare/v1.0.0-rc.5...v1.0.0
129
+ [ 1.0.0 ] : https://github.com/Open-EO/openeo-js-client/compare/v1.0.0-rc.5...v1.0.0
Original file line number Diff line number Diff line change @@ -265,6 +265,9 @@ class Job extends BaseEntity {
265
265
*/
266
266
async getResultsAsStac ( ) {
267
267
let response = await this . connection . _get ( '/jobs/' + this . id + '/results' ) ;
268
+ if ( ! Utils . isObject ( response ) || ! Utils . isObject ( response . data ) ) {
269
+ throw new Error ( "Results received from the back-end are invalid" ) ;
270
+ }
268
271
let data = StacMigrate . stac ( response . data ) ;
269
272
if ( ! Utils . isObject ( data . assets ) ) {
270
273
data . assets = { } ;
You can’t perform that action at this time.
0 commit comments