diff --git a/lib/nostr/errors/invalid_signature_type_error.rb b/lib/nostr/errors/invalid_signature_type_error.rb index bc389c9..07b1015 100644 --- a/lib/nostr/errors/invalid_signature_type_error.rb +++ b/lib/nostr/errors/invalid_signature_type_error.rb @@ -11,6 +11,6 @@ module Nostr # @example # InvalidSignatureTypeError.new # - def initialize = super('Invalid signature type') + def initialize = super('Invalid signature type. It must be a string with lowercase hexadecimal characters.') end end diff --git a/spec/nostr/errors/invalid_signature_type_error_spec.rb b/spec/nostr/errors/invalid_signature_type_error_spec.rb index d38db3d..2fb004e 100644 --- a/spec/nostr/errors/invalid_signature_type_error_spec.rb +++ b/spec/nostr/errors/invalid_signature_type_error_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Nostr::InvalidSignatureTypeError do let(:error) { described_class.new } it 'builds a useful error message' do - expect(error.message).to eq('Invalid signature type') + expect(error.message).to eq('Invalid signature type. It must be a string with lowercase hexadecimal characters.') end end end diff --git a/spec/nostr/signature_spec.rb b/spec/nostr/signature_spec.rb index da20b36..f49513f 100644 --- a/spec/nostr/signature_spec.rb +++ b/spec/nostr/signature_spec.rb @@ -15,7 +15,7 @@ RSpec.describe Nostr::Signature do it 'raises an InvalidSignatureTypeError' do expect { described_class.new(1234) }.to raise_error( Nostr::InvalidSignatureTypeError, - 'Invalid signature type' + 'Invalid signature type. It must be a string with lowercase hexadecimal characters.' ) end end