This matter has been discussed many times. It's better to return the error as the first element to coerce consumers into always handling errors, otherwise it's easy to forget.
In this case, it will be hard to forget, since Typescript is used, so you will know that it is the answer or a null value. Thank you for your comments.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This matter has been discussed many times. It's better to return the error as the first element to coerce consumers into always handling errors, otherwise it's easy to forget.
In this case, it will be hard to forget, since Typescript is used, so you will know that it is the answer or a null value. Thank you for your comments.