Skip to content

superseriouscompany/react-native-error-repro

Repository files navigation

react-native-error-repro

Minimal reproduction case of RCTJSONStringify error from sending underlyingError over websocket

Running this code with the debugger on causes a json error over the debugging websocket:

RCT_EXPORT_METHOD(triggerError:(NSString *)foo
                  resolver:(RCTPromiseResolveBlock)resolve
                  rejecter:(RCTPromiseRejectBlock)reject)
{
  NSError *underlyingError = [NSError errorWithDomain:@"underlyingDomain" code:420 userInfo:nil];
  NSError *err = [NSError errorWithDomain:@"domain" code:69 userInfo:@{@"NSUnderlyingError": underlyingError}];
  
  reject(@"foo", @"bar", err);
}

About

Minimal reproduction case of RCTJSONStringify error from sending underlyingError over websocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published