I have this code to save information in Firebase, it works perfectly but I need to check if it gives me any kind of error, for example that there is no internet connection.
How do I do it?
Thank's
saveData( data: Data ) {
return this.http.post(`${ this.url }/dataX.json`, data)
.pipe(
map( res => {
return res;
})
)
;
}