Azure / Azure/azure-openapi-validator
Function 'patchPropertiesCorrespondToPutProperties' threw an exception: Cannot read property 'length' of undefined
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
I discovered the following errors in the logs of `~[NotRequired_Staging] Swagger LintDiff failed` for a PR for my RP:
```
- FATAL
spectralPluginFunc: Failed validating: 'file:///mnt/vss/_work/1/azure-rest-api-specs-pr/specification/throttling/resource-manager/Microsoft.Throttling/preview/2022-06-01-preview/throttling.json'. Errors encountered:
Error: Error running Nimma
Error 1: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 2: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 3: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 4: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 5: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 6: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
Error 7: $[paths,'x-ms-paths'].* threw: ErrorWithCause("Function \"patchPropertiesCorrespondToPutProperties\" threw an exception: Cannot read property 'length' of undefined")
```
See https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3154242&view=logs&j=688669d0-441c-57c3-cf6d-f89a22ccfa5d&t=b91b1e88-b042-5e18-36d8-34e4fb3a9b3b&l=619
**To Reproduce**
N/A
**Expected behavior**
The function should handle incorrect input gracefully.
**Screenshots**
N/A
**Desktop (please complete the following information):**
N/A
**Additional context**
N/A
Contributor guide
Assessment
This issue has not been assessed yet.