whatsapp-http-api icon indicating copy to clipboard operation
whatsapp-http-api copied to clipboard

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

Open devlikepro opened this issue 9 months ago • 0 comments

          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

devlikepro avatar May 15 '24 07:05 devlikepro