diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb new file mode 100644 index 00000000..82248f7e --- /dev/null +++ b/app/controllers/errors_controller.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class ErrorsController < ApplicationController + # 400 + def bad_request + render(status: :bad_request) + end + + # 404 + def not_found + render(status: :not_found) + end + + # 406 + def unsupported_browser + render(status: :not_acceptable) + end + + # 422 + def unprocessable_entity + render(status: :unprocessable_entity) + end + + # 500 + def internal_server_error + render(status: :internal_server_error) + end +end diff --git a/app/controllers/ui_portal/error_pages_controller.rb b/app/controllers/ui_portal/error_pages_controller.rb new file mode 100644 index 00000000..5d656216 --- /dev/null +++ b/app/controllers/ui_portal/error_pages_controller.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +class UIPortal::ErrorPagesController < UIPortal::BaseController + def show + end +end diff --git a/app/views/errors/bad_request.html.erb b/app/views/errors/bad_request.html.erb new file mode 100644 index 00000000..c97b3539 --- /dev/null +++ b/app/views/errors/bad_request.html.erb @@ -0,0 +1,17 @@ +
+

+ 400 +

+ +

+ Bad Request +

+ +

Please try again in a minute.

+
diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb new file mode 100644 index 00000000..7bedc05b --- /dev/null +++ b/app/views/errors/internal_server_error.html.erb @@ -0,0 +1,17 @@ +
+

+ 500 +

+ +

+ Unexpected Error +

+ +

Please try again in a minute.

+
diff --git a/app/views/errors/not_found.html.erb b/app/views/errors/not_found.html.erb new file mode 100644 index 00000000..6a87fc03 --- /dev/null +++ b/app/views/errors/not_found.html.erb @@ -0,0 +1,20 @@ +
+

+ 404 +

+ +

+ Page Not Found +

+ +
+

If the URL was manually entered, please check for typos:

+ <%= request.original_fullpath %> +
+
diff --git a/app/views/errors/unprocessable_entity.html.erb b/app/views/errors/unprocessable_entity.html.erb new file mode 100644 index 00000000..1fb1312f --- /dev/null +++ b/app/views/errors/unprocessable_entity.html.erb @@ -0,0 +1,15 @@ +
+

+ 422 +

+ +

+ Unprocessable Entity +

+
diff --git a/app/views/errors/unsupported_browser.html.erb b/app/views/errors/unsupported_browser.html.erb new file mode 100644 index 00000000..4602a1d1 --- /dev/null +++ b/app/views/errors/unsupported_browser.html.erb @@ -0,0 +1,20 @@ +
+

+ 406 +

+ +

+ Unsupported Browser +

+ +
+

Your browser is not supported.

+

Please upgrade your browser to continue.

+
+
diff --git a/app/views/ui_portal/base/_nav.html.erb b/app/views/ui_portal/base/_nav.html.erb index a2688b65..f301079d 100644 --- a/app/views/ui_portal/base/_nav.html.erb +++ b/app/views/ui_portal/base/_nav.html.erb @@ -4,6 +4,7 @@