What does null error mean

const fs = require(‘fs’);
const main = [];
let get = {name:“praveen”,age:22};
let data = Object.assign({id:1},get);
main.push(data)
alert(main)
fs.writeFile(‘test.json’,JSON.stringify(main),err=>console.log(err));

In the above code every time , I get data from client to server and try to store it on json file the data gets added to json but why does the code enter err portion with err saying null ?

What does null error mean ?