Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON

I also ran into this issue. It was because I forgot to await for a promise.
Comment

converting circular structure to json

check if you have not added async and await

full problem can be like this:
Converting circular structure to JSON
    --> starting at object with constructor 'MongoClient'
    |     property 's' -> object with constructor 'Object'
    |     property 'sessionPool' -> object with constructor 'ServerSessionPool'
    --- property 'client' closes the circle
Comment

Converting circular structure to JSON

//The error means that the object you pass in the request has a circular reference, something like:

var a = {};
a.b = a;
Comment

converting circular structure to json

var win = window.open('http://www.google.com', 'google','width=800,height=600,status=0,toolbar=0'); 
var timer = setInterval(function() { 
    if(win.closed) {
        clearInterval(timer);
        alert('closed');
    }
}, 1000);
Comment

TypeError: Converting circular structure to JSON

I run into this issue, because i was sending as response the full response of another api call instead of just the data i needed.
Comment

ERROR TypeError: Converting circular structure to JSON - Solution

ficheiro.html
<form novalidate #formulario="ngForm">

<pre>{{ formulario.form | json }}</pre>

</form>

Result : ficheiro.html

{
  "_hasOwnPendingAsyncValidator": false,
  "_parent": null,
  "pristine": true,
  "touched": false,
  "_onDisabledChange": [],
  "_rawValidators": null,
  "_rawAsyncValidators": null,
  "_composedValidatorFn": null,
  "_composedAsyncValidatorFn": null,
  "controls": {},
  "valueChanges": {
    "_isScalar": false,
    "observers": [],
    "closed": false,
    "isStopped": false,
    "hasError": false,
    "thrownError": null,
    "__isAsync": false
  },
  "statusChanges": {
    "_isScalar": false,
    "observers": [],
    "closed": false,
    "isStopped": false,
    "hasError": false,
    "thrownError": null,
    "__isAsync": false
  },
  "status": "VALID",
  "value": {},
  "errors": null
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get data from multiple tables mongoose 
Javascript :: vue 
Javascript :: firebase realtime database javascript 
Javascript :: update state in react 
Javascript :: Template Literals for Strings 
Javascript :: http_proxy 
Javascript :: javascript object as key 
Javascript :: what is bom in javascript 
Javascript :: html css js interview questions 
Javascript :: + operator javascript 
Javascript :: factory function in javascript 
Javascript :: javascript templates 
Javascript :: npm react animation 
Javascript :: get js 
Javascript :: regex serch in capture group 
Javascript :: heap javascript 
Javascript :: vue create component 
Javascript :: object model javascript 
Javascript :: date time react component 
Javascript :: react admin 
Javascript :: javascript split array 
Javascript :: how to edit image tags in javascript 
Javascript :: what does the useReducer do in react 
Javascript :: ondedrive 
Javascript :: how to delete props from url 
Javascript :: javascript nested objects 
Javascript :: using the for of loop in pure javascript to populate data into HTML 
Javascript :: Create an Alchemy Key javascript 
Javascript :: javascript asdyn function 
Javascript :: server sent events node js + github 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =