devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
813 stars 248 forks source link

[BUG] - GET /api/sessions/{name}/ - return 404 if session is not found #333

Open devlikepro opened 1 month ago

devlikepro commented 1 month ago
          Hi @devlikepro / @allburov 

If the {session} is not available, we should return a 404 error, similar to how it's handled in sessions/{session}/me.

data: {
  statusCode: 404,
  message: "We didn't find a session with name '{session}'. Please start it first by using POST /sessions/start request",
  error: 'Not Found'
}

This ensures consistency in error handling across endpoints and provides clear guidance to users when a session is not found.

Originally posted by @MadhabaPatra in https://github.com/devlikeapro/whatsapp-http-api/issues/300#issuecomment-2109830651

patron:PRO