Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
1.0 KiB

class ErrorsController < ApplicationController
skip_before_action :verify_authenticity_token
def not_found
respond_to do |format|
format.html { render status: :not_found }
format.json { render json: { error: "Resource not found" }, status: :not_found }
format.all { render status: :not_found, body: nil }
end
end
def internal_server_error
respond_to do |format|
format.html { render status: :internal_server_error }
format.json { render json: { error: "Internal server error" }, status: :internal_server_error }
end
end
def unprocessable_entity
respond_to do |format|
format.html { render status: :unprocessable_entity }
format.json { render json: { error: "Unprocessable entity" }, status: :unprocessable_entity }
end
end
def too_many_requests
respond_to do |format|
format.html { render status: :too_many_requests }
format.json { render json: { error: "Too many requests" }, status: :too_many_requests }
end
end
end