Hello,
I'm trying to override transformResponse from RestDataSource for a special error message, that should be showed as an isc.warn() instead of inline error.
I tried to do this:
For some reason, status is always 0 and data is empty. Removing this from my code, make it work ok again.
Is it the wrong way of overriding transformResponse?
Thanks!
I'm trying to override transformResponse from RestDataSource for a special error message, that should be showed as an isc.warn() instead of inline error.
I tried to do this:
Code:
isc.RestDataSource.addProperties( { transformResponse: function (dsResponse, dsRequest, data) { var dsResponse = this.Super("transformResponse", arguments); if ( data.response.status == -4 && typeof( data.response.errors.all ) != 'undefined' ) { isc.warn( data.response.errors.all ); } return dsResponse; } } );
Is it the wrong way of overriding transformResponse?
Thanks!