opendoor-labs / rets

RETS Python 3 Client
MIT License
89 stars 43 forks source link

RetsApiError #10

Closed bigoper closed 6 years ago

bigoper commented 7 years ago

Hi All,

How do I catch the RetsApiError? It's not being recognized.

Thanks.

martinxsliu commented 7 years ago

You can import the exception and catch it like you would any other exception. Something like:

from rets.errors import RetsApiError

try:
    rets_client.search(...)
except RetsApiError as e:
    print('caught code %i!' % e.reply_code)

Is this what you meant?

aviivgi commented 6 years ago

Yes. Thank you!!!