boardgamegeekjsclient icon indicating copy to clipboard operation
boardgamegeekjsclient copied to clipboard

Response model refactor

Open LearningProcesss opened this issue 4 years ago • 1 comments

Response model refactor to better handle possible BGG internal server error (502) or rejection like #18, #25, #38

proposal idea

interface BggResponse<T>{
   error: string
   status: number
   data: T[]
}

LearningProcesss avatar Jan 29 '22 16:01 LearningProcesss

@LearningProcesss something like this would be hugely helpful for my team. Last night many users where throwing a 202 error for me. I could see that when calling the API directly. However through this library I only got an empty response after some time.

Knowing that there was an error, and the error code is very important to be able to give the user correct feedback.

ericpoulinnz avatar Aug 22 '23 20:08 ericpoulinnz