whatsapp-http-api
whatsapp-http-api copied to clipboard
[BUG] - GET /api/sessions/{name}/ - return 404 if session is not found
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