remove unsupported syntax
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
		
							parent
							
								
									9026d5e0d6
								
							
						
					
					
						commit
						e89b7cba11
					
				|  | @ -58,10 +58,11 @@ class SynologyError extends GrpcError { | ||||||
|     this.httpCode = httpCode; |     this.httpCode = httpCode; | ||||||
|     if (code > 0) { |     if (code > 0) { | ||||||
|       const error = SYNO_ERRORS[code]; |       const error = SYNO_ERRORS[code]; | ||||||
|       this.code = error?.status ?? grpc.status.UNKNOWN; |       this.code = error && error.status ? error.status : grpc.status.UNKNOWN; | ||||||
|       this.message = |       this.message = | ||||||
|         error?.message ?? |         error && error.message | ||||||
|         `An unknown error occurred when executing a synology command (code = ${code}).`; |           ? error.message | ||||||
|  |           : `An unknown error occurred when executing a synology command (code = ${code}).`; | ||||||
|     } else { |     } else { | ||||||
|       this.code = grpc.status.UNKNOWN; |       this.code = grpc.status.UNKNOWN; | ||||||
|       this.message = `The synology webserver returned a status code ${httpCode}`; |       this.message = `The synology webserver returned a status code ${httpCode}`; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue