handleUnknownPaths

18 views
Skip to first unread message

jmls

unread,
Apr 19, 2015, 10:37:07 AM4/19/15
to loopb...@googlegroups.com
I'm wanting to use my own error handler for missing api paths. I've looked at the code, and think that I need to use the "handleUnknownPaths" option

trouble is that I don't know where to put it ..

;)

Julian

jmls

unread,
Apr 20, 2015, 5:28:25 AM4/20/15
to loopb...@googlegroups.com
My use case is that I want to pass any "missing" api calls onto another server using an http proxy - rather than having to know which api paths are on the other server, I simply want to do a "meh, not found here, try server foo"

does anyone have any idea on where to set this option ?

many thanks

julian

Miroslav Bajtoš

unread,
Apr 23, 2015, 3:48:09 AM4/23/15
to loopb...@googlegroups.com
On Monday, April 20, 2015 at 11:28:25 AM UTC+2, jmls wrote:
My use case is that I want to pass any "missing" api calls onto another server using an http proxy - rather than having to know which api paths are on the other server, I simply want to do a "meh, not found here, try server foo"

does anyone have any idea on where to set this option ?

I believe this option can be set in server/config.json, the section "remoting".

// server/config.json
{
  "port": 3000,
  "remoting": {
    "handleUnknownPaths": false
  }
}

Please let me know if this works, so that we can update the docs.


Miroslav

jmls

unread,
Apr 23, 2015, 6:06:56 AM4/23/15
to loopb...@googlegroups.com
afraid that it didn't work. However, I'm not sure that options are passed into the strong-remote lib ...

Julian

Kursat Kurt

unread,
Dec 8, 2015, 4:55:45 PM12/8/15
to LoopbackJS
Hi;
I needed this option and i found that you should place the option in "rest", not in"remoting".
I tried and it works...

23 Nisan 2015 Perşembe 13:06:56 UTC+3 tarihinde jmls yazdı:
Reply all
Reply to author
Forward
0 new messages