File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 241
241
242
242
function FormatError ( xhr ) {
243
243
if ( xhr && xhr . response ) {
244
+ var response = ParseResponse ( xhr ) ;
245
+
246
+ if ( response instanceof WebApiClient . BatchResponse ) {
247
+ var errors = "" ;
248
+ if ( response . errors . length > 0 ) {
249
+ errors = response . errors . map ( function ( e ) {
250
+ return e . code + ": " + e . message ;
251
+ } ) . join ( "\n\r" ) ;
252
+ }
253
+
254
+ return xhr . status + " - " + errors ;
255
+ }
256
+
244
257
var json = JSON . parse ( xhr . response ) ;
245
258
246
259
if ( ! WebApiClient . PrettifyErrors ) {
388
401
389
402
var nextLink = GetNextLink ( response ) ;
390
403
var pagingCookie = GetPagingCookie ( response ) ;
391
-
404
+
392
405
// Since 9.X paging cookie is always added to response, even in queryParams retrieves
393
406
// In 9.X the morerecords flag can signal whether there are more records to be found
394
407
// In 8.X the flag was not present and instead the pagingCookie was only set if more records were available
533
546
534
547
var nextLink = GetNextLink ( response ) ;
535
548
var pagingCookie = GetPagingCookie ( response ) ;
536
-
549
+
537
550
// Since 9.X paging cookie is always added to response, even in queryParams retrieves
538
551
// In 9.X the morerecords flag can signal whether there are more records to be found
539
552
// In 8.X the flag was not present and instead the pagingCookie was only set if more records were available
You can’t perform that action at this time.
0 commit comments