Moleculer: Remove annoying favicon.ico error message when calling service from browser

Created on 13 Jun 2017  路  5Comments  路  Source: moleculerjs/moleculer

When I call a service from Chrome, I always get:
ServiceNotFoundError: Service 'favicon.ico' is not available! followed by an error stack.

Question

Most helpful comment

Yes, because Chrome is automatically try to download favicon for the given URL.
I don't want to resolve it in Moleculer, because it appears only at developing. In production (I think) you won't call actions directly from Chrome. You will call it with AJAX or something. Or if you want to serve static files you can do it and put a favicon.ico file to the assets folder.

Other workaround with function alias:

aliases: {
    ...
    "GET favicon.ico"(route, req, res) {
        // ... send back the file or something with `res`
    }
}

All 5 comments

Yes, because Chrome is automatically try to download favicon for the given URL.
I don't want to resolve it in Moleculer, because it appears only at developing. In production (I think) you won't call actions directly from Chrome. You will call it with AJAX or something. Or if you want to serve static files you can do it and put a favicon.ico file to the assets folder.

Other workaround with function alias:

aliases: {
    ...
    "GET favicon.ico"(route, req, res) {
        // ... send back the file or something with `res`
    }
}

Hi, I too get this issue, and I have not linked favicon anywhere on the project. How do I get rid of it? It's very annoying X(

Put a favicon.ico beside index.html

Put a favicon.ico beside index.html

But I don't need a favicon. And hence I have not linked it anywhere.

You can remove the favicon request by adding the following line in your <head> section of your HTML page -

<link rel="icon" href="data:,">

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dylanwulf picture dylanwulf  路  4Comments

SushKenyNeosoft picture SushKenyNeosoft  路  3Comments

abdavid picture abdavid  路  4Comments

thatisuday picture thatisuday  路  3Comments

molobala picture molobala  路  3Comments