This repository was archived by the owner on Jul 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,14 @@ const sharedCriteriaSchema = z.object({
40
40
reef_type : z . string ( ) . describe ( 'The type of reef, slopes or flats' ) ,
41
41
42
42
// Criteria - all optional to match the Union{Float64,Nothing} in worker
43
- depth_min : z . number ( ) . optional ( ) . describe ( 'The depth range (min)' ) ,
44
- depth_max : z . number ( ) . optional ( ) . describe ( 'The depth range (max)' ) ,
43
+ depth_min : z
44
+ . number ( )
45
+ . optional ( )
46
+ . describe ( 'The depth minimum (the deeper more negative value)' ) ,
47
+ depth_max : z
48
+ . number ( )
49
+ . optional ( )
50
+ . describe ( 'The depth maximum (the shallower less negative value)' ) ,
45
51
slope_min : z . number ( ) . optional ( ) . describe ( 'The slope range (min)' ) ,
46
52
slope_max : z . number ( ) . optional ( ) . describe ( 'The slope range (max)' ) ,
47
53
rugosity_min : z . number ( ) . optional ( ) . describe ( 'The rugosity range (min)' ) ,
@@ -167,7 +173,11 @@ export class JobService {
167
173
try {
168
174
return schema . parse ( payload ) ;
169
175
} catch ( e ) {
170
- throw new BadRequestException ( `Invalid payload for job type ${ jobType } ` ) ;
176
+ const cause = e instanceof Error ? e : undefined ;
177
+ throw new BadRequestException (
178
+ `Invalid payload for job type ${ jobType } ` ,
179
+ cause ,
180
+ ) ;
171
181
}
172
182
}
173
183
You can’t perform that action at this time.
0 commit comments