Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

static_errors

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

static_errors

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Overview

StaticErrors is a gem to help with the creation of static error pages. It allows you to use a dynamically generated page as a template, so all of your default styling and layouts can be used to design the error page. This dynamic page is then saved for static rendering.

Syntax

rake static_errors <options: option=value,value2>
OptionsUseDefault
pathChanges the dynamic error root urlhttp://localhost:3000/errors/
languagesAny additional languages to save
errorsWhich errors to save
destinationWhere to save the static error pagespublic/

Use Cases

1: Basic Operations

rake static_errors errors=404

Saving http://localhost:3000/errors/404 to public/404.html

2: Multiple Errors

rake static_errors errors=422,500

Saving http://localhost:3000/errors/422 to public/422.html
Saving http://localhost:3000/errors/500 to public/500.html

3: Multiple Languages

rake static_errors errors=422 languages=en-GB,de

Saving http://localhost:3000/errors/422 to public/422.html
Saving http://localhost:3000/errors/422?locale=en-GB to public/422.en-GB.html
Saving http://localhost:3000/errors/422?locale=de to public/422.de.html

4: Custom URL / Filepaths

rake static_errors errors=422 path=http://mytestserver/special_errors/ destination=public/local/errors/

Saving http://mytestserver/special_errors/422 to public/local/errors/422.html

Final Considerations

You may wish to check the urls of any externally referenced files needed to render your error pages. ex: Should jquery/bootstrap/etc be at the same url for your static errors?

FAQs

Package last updated on 31 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc