Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

Commit e315530

Browse files
committed
Use TypeError, not ValueError
1 parent e0a37a9 commit e315530

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_codec/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ def decode(self, bytes, **options):
3232

3333
def encode(self, document, **options):
3434
if not isinstance(document, Document):
35-
raise ValueError('Expected a `coreapi.Document` instance')
35+
raise TypeError('Expected a `coreapi.Document` instance')
3636
data = generate_swagger_object(document)
3737
return force_bytes(json.dumps(data))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy