@@ -97,13 +97,7 @@ public final void async(final PNCallback<Output> callback) {
9797
9898 try {
9999 call = doWork (createBaseParams ());
100- } catch (PubNubException e ) {
101-
102- PubNubException pubnubException = PubNubException .builder ()
103- .pubnubError (PubNubErrorBuilder .PNERROBJ_HTTP_ERROR )
104- .errormsg (e .getMessage ())
105- .build ();
106-
100+ } catch (PubNubException pubnubException ) {
107101 callback .onResponse (null , createStatusResponse (PNStatusCategory .PNBadRequestCategory , null , pubnubException ));
108102 return ;
109103 }
@@ -145,14 +139,7 @@ public void onResponse(final Call<Input> performedCall, final Response<Input> re
145139
146140 try {
147141 callbackResponse = createResponse (response );
148- } catch (PubNubException e ) {
149-
150- PubNubException pubnubException = PubNubException .builder ()
151- .pubnubError (PubNubErrorBuilder .PNERROBJ_PARSING_ERROR )
152- .errormsg (e .getMessage ())
153- .statusCode (response .code ())
154- .build ();
155-
142+ } catch (PubNubException pubnubException ) {
156143 callback .onResponse (null , createStatusResponse (PNStatusCategory .PNMalformedResponseCategory , response , pubnubException ));
157144 return ;
158145 }
@@ -229,7 +216,6 @@ private PNStatus createStatusResponse(PNStatusCategory category, Response<Input>
229216 pnStatus .clientRequest (response .raw ().request ());
230217 }
231218
232-
233219 pnStatus .operation (getOperationType ());
234220 pnStatus .category (category );
235221 pnStatus .affectedChannels (getAffectedChannels ());
@@ -249,7 +235,6 @@ protected final Map<String, String> createBaseParams() {
249235 params .put ("auth" , pubnub .getConfiguration ().getAuthKey ());
250236 }
251237
252-
253238 return params ;
254239 }
255240
0 commit comments