Sha256: 2dc7e5125c83a241af21edf96aaddce7bbb913671058884b237e0262a5785274
Contents?: true
Size: 372 Bytes
Versions: 17
Compression:
Stored size: 372 Bytes
Contents
# frozen_string_literal: true # THe error code API class ErrorController < ApplicationController # GET error/:code def show render status: :bad_request, json: error_response end private def error_response code = params[:code].to_i { error: { code: code, message: "You requested error code: #{code}", }, } end end
Version data entries
17 entries across 17 versions & 1 rubygems