pubnub / javascript

PubNub JavaScript SDK docs https://www.pubnub.com/docs/sdks/javascript
Other
553 stars 401 forks source link

PubNubError: REST API request processing error, check status for details #395

Open utopictown opened 3 months ago

utopictown commented 3 months ago

i got this from sentry report

PubNubError
REST API request processing error, check status for details

/static/js/1110.f5392ca0.chunk.js in R.toPubNubError at line 2:532490

/*! For license information please see 1110.f5392ca0.chunk.js.LICENSE.txt */
{snip} usCode,errorData:this.errorData}}toPubNubError(e,t){return new d(null!=t?t:this.message,this.toStatus(e))}}class x{constructor(e){this.confi {snip}

version: "pubnub": "^8.2.4"

i dont know what caused this. can anyone help to debug this better?

feature request: is it possible to throw more useful message?

parfeon commented 3 months ago

@utopictown thank you for reporting back.

Failure reason is part of error.status (Status) contains more information.

type Status = {   
  error: boolean
  category: StatusCategory
  operation?: RequestOperation
  statusCode: number
  errorData?: Error | Payload
  [p: string]: Payload | Error | undefined 
}
utopictown commented 3 months ago

how do i check status for details? i dont know which part caused this