About angular subscribe err

I saw an example in the angular service subscribe:

this.xxService.readBook().subscribe(
(data) =>{ console.log(data)},
(err) => { console.log(err)
)

is there any other data in subcribe besides data and err?
is the order data first and then err??
where does this err come from? What does it contain? How to use this err? Is it simple console.log or does it have other uses?

Feb.26,2021

one is the function, executed on success and the other is the function executed on failure. Will a function execution be both successful and failed? Of course not, so only one of those two function will be executed.

for detailed subcribe parameters, you can check the rxjs documentation

p.s. Don't you even look at the documents first?!

Menu