Debian Codegraph @

plugin/mastodon_sse_streaming/error.rb

raw symbols SCIP
1 # frozen_string_literal: true
2
3 module Plugin::MastodonSseStreaming
4 class BaseError < ::StandardError; end
5
6 # SSEのHTTPリクエストが完了し、レスポンスを受け取った
7 class ResponseError < BaseError
8 attr_reader :code, :response
9
10 def initialize(error_message=nil, code:, response:)
11 super(error_message)
12 @code = code
13 @response = response
14 end
15 end
16
17 # TCPコネクションが切断され、レスポンスが受け取れない
18 class ConnectionRefusedError < BaseError; end
19
20 # Handlerがすべて削除された : このコネクションを切断することを期待
21 class NoHandlerExsitsError < BaseError; end
22 end