Great, thanks for that! The only modification I've made really is to swap out the authentication plug-in, and then modify some css here and there. All of the HTTP errors are just returning blank pages.
On Wed, Nov 1, 2017 at 3:31 PM, Nick Couchman <[email protected]> wrote: > > > On Wed, Nov 1, 2017 at 9:01 AM, Erin Versfeld <[email protected]> > wrote: > >> Thanks, Ryan and Nick, >> >> I've played around with all the log settings in the browser console, and >> run my app on multiple browsers, so that at least can be rules out as an >> issue for now. >> >> Looking more closely at minify-maven, one of the tools its built on top >> of is Google's Closure Compiler, which "parses your JavaScript, analyzes >> it, removes dead code and rewrites and minimizes what's left", which could >> potentially explain this behaviour. Commenting out that whole process from >> the pom file then breaks things because app.js isn't build. I'm playing >> around with changing the index.html and seeing if just pointing it to the >> individual .js files works, but alternative suggestions are also welcome. >> >> I tried injecting the $log service, but had no luck. It's entirely >> possible that I wasn't doing it correctly, though, so I'm heading back to >> the docs to confirm that. >> > > In the file where you want to use it, simply find the sections toward the > top of the file that have one or more $injector.get lines, and add the > following: > > var $log = $injector.get('$log'); > > Then elsewhere in your code use $log.debug('Your debug message here.') to > get the output (or $log.info(), $log.warn(), $log.error()). > > It's also possible that the lines of code where you're attempting to put > log statements aren't actually being reached, so make sure you're putting > those statements in places that you absolutely know are executing. > > > >> >> I am modifying the client rather than using the API portions of the >> client code to write a custom app. The kinds of errors I expect to see are >> the stock standard HTTP errors, like 404s, 500s, etc. I'd just like to have >> a little pop up or display a relevant error message when these errors >> occur. The browser is able to tell which of these errors has occurred, so >> it looks like everything is working as expected, its just handling this on >> the client side which is proving irksome. I'm trying to use the logs to >> work out where things should be handled but aren't. >> >> > Yeah, there's just a lot of code already in the client app that handles > these errors, so it's quite possible that the errors you're trying to > capture are being intercepted elsewhere in the code and either handled > transparently or with the guacNotification() code. That's why I ask about > this. Are you modifying things inside the guacamole/src/main/webapp/app/rest > directory, or elsewhere? It really depends on what you're trying to do, > but there are several instances where 404s, for example, are part of the > normal operation of the client and just get handled transparently within > the client without bothering the user about it, so I'm wondering if the > 404s you're seeing are already being handled and never making it to the > code you're writing. > > -Nick > -- All the best, Erin Versfeld
