nibrahim/openlibrary — comment on commit f82527f3a68ab676888c1b1d4b2581df261074b4
File: openlibrary/plugins/importapi/code.py line 266
By anandology:

It will be nice to return JSON response when redirect_url is not provided. Both of success and error.

You should raise web.seeother/web.ok instead of return.