-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client errors #291
Client errors #291
Conversation
it('should contain the error details', function(){ | ||
|
||
var exp = getRegExpFromJson(expectedRequest), | ||
expected = new RegExp('Error: Server-side rendering failed: request ' + exp + ' failed \\(timeout\\)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matteofigus is it worth including actual timeout value in the error message as well (for diagnostic purposes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is there. The client has a default overridable timeout value that is always passed through the request call. Now we log all the arguments that we pass to that function call ( a JSON.stringify of expectedRequest
- a couple of lines up) - which contains timeout, headers, body payload, everything.
An example of an error (I censored some private data stuff):
[Error: Server-side rendering failed: request {"url":"http://xxx","method":"post","headers":{"accept-language":"fr-CA, fr, en, *","ot-requestid":"xxx","ot-referringhost":"127.0.0.1","ot-referringservice":"xxx","accept":"application/vnd.oc.unrendered+json","user-agent":"oc-client-1.10.0/v4.4.4-darwin-x64"},"timeout":5,"json":true,"body":{"components":[{"name":"xxx","parameters":{xxx},"version":"1.2.0"}]}} failed (timeout)] ]
This follows #288 - basically tackles 2 things: