(result: any)
| 97 | } |
| 98 | |
| 99 | function hasPythonResultError(result: any): boolean { |
| 100 | // Must stay consistent with validateCallApiResult's own-property check: |
| 101 | // loosening this to `'error' in result` without also loosening validation |
| 102 | // would let a script return an error on the prototype chain, pass validation |
| 103 | // via an own `output`, and then be cached as a successful result — a |
| 104 | // cache-poisoning vector. |
| 105 | return ( |
| 106 | hasPythonResultProperty(result, 'error') && |
| 107 | result.error !== null && |
| 108 | result.error !== undefined && |
| 109 | result.error !== '' |
| 110 | ); |
| 111 | } |
| 112 | |
| 113 | function validateCallApiResult(functionName: string, result: any): void { |
| 114 | // Log result structure for debugging |
no test coverage detected
searching dependent graphs…