@@ -6,10 +6,10 @@ describe('Errors', function() {
66 describe ( 'sanitizeErrorRequestData' , function ( ) {
77 describe ( 'when passed in error is missing request data and headers' , function ( ) {
88 var error = { response : { request : { } } } ;
9- var sanitizedError = errors . sanitizeErrorRequestData ( error ) ;
9+ var redactedError = errors . sanitizeErrorRequestData ( error ) ;
1010
1111 it ( 'should return error' , function ( ) {
12- expect ( sanitizedError ) . to . equal ( error ) ;
12+ expect ( redactedError ) . to . equal ( error ) ;
1313 } ) ;
1414 } ) ;
1515
@@ -25,14 +25,14 @@ describe('Errors', function() {
2525 }
2626 }
2727 } ;
28- const sanitizedError = errors . sanitizeErrorRequestData ( error ) ;
29- const sanitizedData = sanitizedError . response . request . _data ;
28+ const redactedError = errors . sanitizeErrorRequestData ( error ) ;
29+ const sanitizedData = redactedError . response . request . _data ;
3030
31- it ( 'should return [SANITIZED ] for DATA_SECRET' , function ( ) {
32- expect ( sanitizedData . DATA_SECRET ) . to . equal ( '[SANITIZED ]' ) ;
31+ it ( 'should return [REDACTED ] for DATA_SECRET' , function ( ) {
32+ expect ( sanitizedData . DATA_SECRET ) . to . equal ( '[REDACTED ]' ) ;
3333 } ) ;
34- it ( 'should return [SANITIZED ] for DATA_SECRET' , function ( ) {
35- expect ( sanitizedData . DATA_SECRET ) . to . equal ( '[SANITIZED ]' ) ;
34+ it ( 'should return [REDACTED ] for DATA_SECRET' , function ( ) {
35+ expect ( sanitizedData . DATA_SECRET ) . to . equal ( '[REDACTED ]' ) ;
3636 } ) ;
3737 it ( 'should return original value for USER_NAME' , function ( ) {
3838 expect ( sanitizedData . USER_NAME ) . to . equal ( sanitizedData . USER_NAME ) ;
@@ -49,11 +49,11 @@ describe('Errors', function() {
4949 }
5050 }
5151 } ;
52- const sanitizedError = errors . sanitizeErrorRequestData ( error ) ;
53- const sanitizedData = sanitizedError . response . request . _header ;
52+ const redactedError = errors . sanitizeErrorRequestData ( error ) ;
53+ const sanitizedData = redactedError . response . request . _header ;
5454
55- it ( 'should return [SANITIZED ] for authorization' , function ( ) {
56- expect ( sanitizedData . authorization ) . to . equal ( '[SANITIZED ]' ) ;
55+ it ( 'should return [REDACTED ] for authorization' , function ( ) {
56+ expect ( sanitizedData . authorization ) . to . equal ( '[REDACTED ]' ) ;
5757 } ) ;
5858 } ) ;
5959 } ) ;
@@ -100,8 +100,8 @@ describe('Errors', function() {
100100 expect ( sanitizedError . originalError ) . to . eql ( originalError ) ;
101101 } ) ;
102102
103- it ( 'should sanitize the original error sensitive information' , function ( ) {
104- expect ( sanitizedError . originalError . response . request . _data . secret ) . to . eql ( '[SANITIZED ]' ) ;
103+ it ( 'should redact the original error sensitive information' , function ( ) {
104+ expect ( sanitizedError . originalError . response . request . _data . secret ) . to . eql ( '[REDACTED ]' ) ;
105105 } ) ;
106106
107107 it ( 'should have a stack with the message and location the error was created' , function ( ) {
0 commit comments