I've seen some issues with fanr, so reporting it here:
WebModAuth : the auth methods allow to return true or false but that do not provide a way to explain why ... I guess it's ok, but sometimes an explanation would be useful.
When there are errors in the publish and the like methods, the error reporting is failing, at least on my machine.
I would get something like:
ERROR: publish command failed
fanr::RemoteErr: Cannot parse response as JSON [100]
use -errTrace for full stack trace
That is not the actual error though, an issue is coming up when it's trying to parse the error ... I see in WebRepo at line 101 it's checking f the status code is not 100 then it will parse the message and throw a proper (JSON) error but this desn't happen because I've found the status code is always coming as 100 ... I've found that this is caused by the line 98 (expect : "100-continue") and that without that the status code arrives properly (not sure if that is a bug of it's own ? ) and errTrace does not help.
I've tried to remove the 100-continue header and while the status code comes in correctly it still fails, it seem to time ut and error out trying to parse the json error message:
Also while I'm at it at Main:57, it would probably make sense to show at least the Err message along with the "Command failed" message, as that's much more informative.
tcolarMon 27 Aug 2012
Never mind the lats bit about Main, i see it would display the error correctly if it was not for the other issues.
brianTue 28 Aug 2012
fanr::RemoteErr: Cannot parse response as JSON 100
That just means that HTTP 100 was returned and the content wasn't JSON. There isn't much too it. That HTTP POST requires expect-continue behavior. @SlimerDude had similiar problem trying to use an HTTP proxy 1984.
tcolarTue 28 Aug 2012
hum ok. the thing is that I have no proxy involved here. I am going directly to wisp . well i am using draft but still its all fantom.
andyTue 28 Aug 2012
well i am using draft but still its all fantom.
Draft runs a primitive proxy server between processes in development mode:
tcolar Mon 27 Aug 2012
I've seen some issues with fanr, so reporting it here:
When there are errors in the publish and the like methods, the error reporting is failing, at least on my machine.
I would get something like:
That is not the actual error though, an issue is coming up when it's trying to parse the error ... I see in WebRepo at line 101 it's checking f the status code is not 100 then it will parse the message and throw a proper (JSON) error but this desn't happen because I've found the status code is always coming as 100 ... I've found that this is caused by the line 98 (expect : "100-continue") and that without that the status code arrives properly (not sure if that is a bug of it's own ? ) and errTrace does not help.
I've tried to remove the 100-continue header and while the status code comes in correctly it still fails, it seem to time ut and error out trying to parse the json error message:
Also while I'm at it at Main:57, it would probably make sense to show at least the Err message along with the "Command failed" message, as that's much more informative.
tcolar Mon 27 Aug 2012
Never mind the lats bit about Main, i see it would display the error correctly if it was not for the other issues.
brian Tue 28 Aug 2012
That just means that HTTP 100 was returned and the content wasn't JSON. There isn't much too it. That HTTP POST requires expect-continue behavior. @SlimerDude had similiar problem trying to use an HTTP proxy 1984.
tcolar Tue 28 Aug 2012
hum ok. the thing is that I have no proxy involved here. I am going directly to wisp . well i am using draft but still its all fantom.
andy Tue 28 Aug 2012
Draft runs a primitive proxy server between processes in development mode:
https://bitbucket.org/afrankvt/draft/src/b54108955fc6/src/fan/Dev.fan#cl-155
Mostly likely a bug or missing use case in Draft (or WebClient) - if you wanted to dig around and see.
tcolar Tue 28 Aug 2012
Thanks, got all of that working properly by adding 100-continue support to draft.