Custom Error without showing zoo error
4 posts
• Page 1 of 1
- drbuchanan
- Posts: 1
- Joined: 06 Jun 2017, 13:55
Custom Error without showing zoo error
I am working on a website which has custom errors in Rails. (The site uses IIS and Helicon Zoo on a windows server)
In order to get these custom errors to work, I needed to turn error mode to custom/detailed. This allows any 500, 404, etc. error to go to a page in the rails application that handles it ( checks if it should redirect anywhere, records the error to a table, and on a 500 shows the error to an admin user, and on 404 shows suggested pages to users.)
However, whenever there is an error with rails itself running, (a gem missing, syntax error, timeout, etc.) it falls back to the helicon zoo error page, which shows the full error and environment variables to the user. (NOT good!) I have looked into many solutions and alternatives, but cannot find a way to get the desired functionality. (Custom rails errors on 500/404 errors, but NO zoo error on rails server not running) The only solution to this problem I have been able to find seems to be to turn custom/detailed errors off, which would not allow us to do the custom rails error pages, and we would need to create html error pages that are not part of the rails code/server, or rely on default iis errors.
Is there a way we can have these custom rails error routes, but not show the zoo errors when the server has problems running? Or at least a way to change the Helicon Zoo errors to no longer show the environment variables and stack trace?
Thanks.
In order to get these custom errors to work, I needed to turn error mode to custom/detailed. This allows any 500, 404, etc. error to go to a page in the rails application that handles it ( checks if it should redirect anywhere, records the error to a table, and on a 500 shows the error to an admin user, and on 404 shows suggested pages to users.)
However, whenever there is an error with rails itself running, (a gem missing, syntax error, timeout, etc.) it falls back to the helicon zoo error page, which shows the full error and environment variables to the user. (NOT good!) I have looked into many solutions and alternatives, but cannot find a way to get the desired functionality. (Custom rails errors on 500/404 errors, but NO zoo error on rails server not running) The only solution to this problem I have been able to find seems to be to turn custom/detailed errors off, which would not allow us to do the custom rails error pages, and we would need to create html error pages that are not part of the rails code/server, or rely on default iis errors.
Is there a way we can have these custom rails error routes, but not show the zoo errors when the server has problems running? Or at least a way to change the Helicon Zoo errors to no longer show the environment variables and stack trace?
Thanks.
Re: Custom Error without showing zoo error
Hello.
Zoo error only pops up when application backend completely failed to handle the request, basically when backend worker crashed or did not return correct response. Whether backend worker returns error status code, i.e. 50x, 40x, etc, the request is considered handled by backend anyway and Zoo error does not show up. Thus if there is a way to configure Ruby not to crash on errors but return some custom error page instead, it should work with Zoo as well. I only suspect that custom errors you are referring are part of some Ruby development web server, and not Rails framework itself.
Next, Zoo errors are just normal IIS errors and Zoo relies on IIS settings regarding error handling. So you can intercept these errors as well and reroute them to custom page using IIS settings (like custom errors, etc.) Alternatively, you can use Helicon Ape custom error feature to intercept error responses and return custom error pages.
Zoo error only pops up when application backend completely failed to handle the request, basically when backend worker crashed or did not return correct response. Whether backend worker returns error status code, i.e. 50x, 40x, etc, the request is considered handled by backend anyway and Zoo error does not show up. Thus if there is a way to configure Ruby not to crash on errors but return some custom error page instead, it should work with Zoo as well. I only suspect that custom errors you are referring are part of some Ruby development web server, and not Rails framework itself.
Next, Zoo errors are just normal IIS errors and Zoo relies on IIS settings regarding error handling. So you can intercept these errors as well and reroute them to custom page using IIS settings (like custom errors, etc.) Alternatively, you can use Helicon Ape custom error feature to intercept error responses and return custom error pages.
- bettydhughe
- Posts: 1
- Joined: 02 Nov 2017, 09:25
Re: Custom Error without showing zoo error
That is a pity, it would have been a decent element. Is it conceivable to cripple the 404 divert from Yootheme to permit another module to divert to a custom article.
site :
https://www.bestessaywritingservice.co/
site :
https://www.bestessaywritingservice.co/
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests