Skip to content

Commit 60bdd2e

Browse files
committed
Remove now superfluous error
1 parent 5f4c1a2 commit 60bdd2e

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

lib/jsonapi/exceptions.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,26 +141,6 @@ def errors
141141
end
142142
end
143143

144-
145-
class HasManyRelationExists < Error
146-
attr_accessor :id
147-
148-
def initialize(id, error_object_overrides = {})
149-
@id = id
150-
super(error_object_overrides)
151-
end
152-
153-
def errors
154-
[create_error_object(code: JSONAPI::RELATION_EXISTS,
155-
status: :bad_request,
156-
title: I18n.translate('jsonapi-resources.exceptions.has_many_relation.title',
157-
default: 'Relation exists'),
158-
detail: I18n.translate('jsonapi-resources.exceptions.has_many_relation.detail',
159-
default: "The relation to #{id} already exists.",
160-
id: id))]
161-
end
162-
end
163-
164144
class BadRequest < Error
165145
def initialize(exception, error_object_overrides = {})
166146
@exception = exception

0 commit comments

Comments
 (0)