ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
34 stars 2 forks source link

Misleading HTTP responses for API endpoints #3435

Open ad-85 opened 1 month ago

ad-85 commented 1 month ago

Version

4.2.21

Severity

Low

Environment

msi

Steps to Reproduce

When attempting to hit an API endpoint that does not exist OR using the incorrect method, an HTTP 401 response with an empty body is received.

Expected behavior

Wrong method -> HTTP 405 response
Nonexistent endpoint -> HTTP 404 response

Actual behavior

HTTP 401 is received in all cases

Additional Environment data

Screenshots/Animations

No response