Which @angular/* package(s) are relevant/related to the feature request?
core
Description
In my library, I expose a HTTP interceptor. since it is a deliberate design of the new API to require the user to add the interceptor manually in withInterceptors function (#51303,). there is a need to throw an exception or notify the user that he forgot to add the specific interceptor.
Related SO https://stackoverflow.com/questions/78869196/how-to-check-if-an-interceptor-is-provided-in-withinterceptors-fucntion?noredirect=1#comment139055699_78869196
How can this be accomplished?
Proposed solution
An injection token that can be injected in a singleton service to check for the added Http interceptors. and can throw an error accordingly.
Alternatives considered
Many libraries may include interceptors, and the new API design prevents authors from automatically adding the needed interceptors. there must be a way to notify the user for not adding an interceptor when he uses the library.
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
In my library, I expose a HTTP interceptor. since it is a deliberate design of the new API to require the user to add the interceptor manually in
withInterceptorsfunction (#51303,). there is a need to throw an exception or notify the user that he forgot to add the specific interceptor.Related SO https://stackoverflow.com/questions/78869196/how-to-check-if-an-interceptor-is-provided-in-withinterceptors-fucntion?noredirect=1#comment139055699_78869196
How can this be accomplished?
Proposed solution
An injection token that can be injected in a singleton service to check for the added Http interceptors. and can throw an error accordingly.
Alternatives considered
Many libraries may include interceptors, and the new API design prevents authors from automatically adding the needed interceptors. there must be a way to notify the user for not adding an interceptor when he uses the library.