Skip to content

Commit

Permalink
feat: add contract not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
shaojunda committed Oct 15, 2019
1 parent 7b345f9 commit 3659d59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/lib/api/v1/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ def initialize
super code: 1020, status: 422, title: "URI parameters is invalid", detail: "Given net info name is invalid", href: "https://nervosnetwork.github.io/ckb-explorer/public/api_doc.html"
end
end

class ContractNotFoundError < Error
def initialize
super code: 1021, status: 404, title: "Contract Not Found", detail: "No contract records found by given contract name", href: "https://nervosnetwork.github.io/ckb-explorer/public/api_doc.html"
end
end
end
end
end

0 comments on commit 3659d59

Please sign in to comment.