Skip to content

Return 405 instead of 426 for HTTP requests to WebSocket endpoint#3

Merged
davehorton merged 1 commit intomainfrom
fix/http-405-for-non-websocket-requests
Mar 17, 2026
Merged

Return 405 instead of 426 for HTTP requests to WebSocket endpoint#3
davehorton merged 1 commit intomainfrom
fix/http-405-for-non-websocket-requests

Conversation

@davehorton
Copy link
Contributor

Summary

  • Changes the default HTTP response for non-WebSocket requests from 426 Upgrade Required to 405 Method Not Allowed
  • Prevents confusing Invalid appenv schema errors in the jambonz portal when it sends an OPTIONS probe to apps that don't define envVars
  • No behavior change for apps that provide envVars — OPTIONS still returns 200 with the schema

Closes #2

Test plan

  • All existing tests pass (113/113)
  • Verify jambonz portal no longer shows Invalid appenv schema for WebSocket apps without envVars

Generated with Claude Code

When no envVars are provided, the HTTP request handler now returns
405 Method Not Allowed instead of 426 Upgrade Required. This prevents
confusing "Invalid appenv schema" errors in the jambonz portal when
it sends an OPTIONS probe to discover application environment variables.

Closes #2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davehorton davehorton merged commit 4970b8a into main Mar 17, 2026
@davehorton davehorton deleted the fix/http-405-for-non-websocket-requests branch March 17, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSocket createEndpoint should return 405 for HTTP requests when no envVars defined

1 participant