from core.util.problem_detail import ProblemDetail as pd from api.problem_details import * from flask.ext.babel import lazy_gettext as _ INVALID_ADMIN_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/admin-credentials-invalid", 401, _("Invalid admin credentials"), _("A valid library staff email is required."), ) GOOGLE_OAUTH_FAILURE = pd( "http://librarysimplified.org/terms/problem/google-oauth-failure", 400, _("Google OAuth Error"), _("There was an error connecting with Google OAuth."), ) INVALID_CSRF_TOKEN = pd( "http://librarysimplified.org/terms/problem/invalid-csrf-token", 400, _("Invalid CSRF token"), _("There was an error saving your changes."), ) INVALID_EDIT = pd( "http://librarysimplified.org/terms/problem/invalid-edit", 400, _("Invalid edit"), _("There was a problem with the edited metadata."), )
from core.util.problem_detail import ProblemDetail as pd from api.problem_details import * from flask_babel import lazy_gettext as _ ADMIN_AUTH_NOT_CONFIGURED = pd( "http://librarysimplified.org/terms/problem/admin-auth-not-configured", 500, _("Admin auth not configured"), _("This circulation manager has not been configured to authenticate admins."), ) ADMIN_AUTH_MECHANISM_NOT_CONFIGURED = pd( "http://librarysimplified.org/terms/problem/admin-auth-mechanism-not-configured", 400, _("Admin auth mechanism not configured"), _("This circulation manager has not been configured to authenticate admins with the mechanism you used"), ) INVALID_ADMIN_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/admin-credentials-invalid", 401, _("Invalid admin credentials"), _("Valid library staff credentials are required."), ) ADMIN_NOT_AUTHORIZED = pd( "http://librarysimplified.org/terms/problem/admin-not-authorized", 403, _("Admin not authorized"), _("Your admin account is not authorized to make this request."), )
from core.util.problem_detail import ProblemDetail as pd from api.problem_details import * from flask.ext.babel import lazy_gettext as _ ADMIN_AUTH_NOT_CONFIGURED = pd( "http://librarysimplified.org/terms/problem/admin-auth-not-configured", 500, _("Admin auth not configured"), _("This circulation manager has not been configured to authenticate admins." ), ) ADMIN_AUTH_MECHANISM_NOT_CONFIGURED = pd( "http://librarysimplified.org/terms/problem/admin-auth-mechanism-not-configured", 400, _("Admin auth mechanism not configured"), _("This circulation manager has not been configured to authenticate admins with the mechanism you used" ), ) INVALID_ADMIN_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/admin-credentials-invalid", 401, _("Invalid admin credentials"), _("Valid library staff credentials are required."), ) GOOGLE_OAUTH_FAILURE = pd( "http://librarysimplified.org/terms/problem/google-oauth-failure", 400, _("Google OAuth Error"),
from core.util.problem_detail import ProblemDetail as pd from core.problem_details import * from flask_babel import lazy_gettext as _ REMOTE_INTEGRATION_FAILED = pd( "http://librarysimplified.org/terms/problem/remote-integration-failed", 502, _("Third-party service failed."), _("The library could not complete your request because a third-party service has failed." ), ) CANNOT_GENERATE_FEED = pd( "http://librarysimplified.org/terms/problem/cannot-generate-feed", 500, _("Feed should be been pre-cached."), _("This feed should have been pre-cached. It's too expensive to generate dynamically." ), ) INVALID_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/credentials-invalid", 401, _("Invalid credentials"), _("A valid library card barcode number and PIN are required."), ) EXPIRED_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/credentials-expired", 403, _("Expired credentials."),
from core.util.problem_detail import ProblemDetail as pd from api.problem_details import * from flask.ext.babel import lazy_gettext as _ ADMIN_AUTH_NOT_CONFIGURED = pd( "http://librarysimplified.org/terms/problem/admin-auth-not-configured", 500, _("Admin auth not configured"), _("This circulation manager has not been configured to authenticate admins." ), ) INVALID_ADMIN_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/admin-credentials-invalid", 401, _("Invalid admin credentials"), _("A valid library staff email is required."), ) GOOGLE_OAUTH_FAILURE = pd( "http://librarysimplified.org/terms/problem/google-oauth-failure", 400, _("Google OAuth Error"), _("There was an error connecting with Google OAuth."), ) INVALID_CSRF_TOKEN = pd( "http://librarysimplified.org/terms/problem/invalid-csrf-token", 400, _("Invalid CSRF token"), _("There was an error saving your changes."),
from core.util.problem_detail import ProblemDetail as pd from core.problem_details import * from flask_babel import lazy_gettext as _ NO_AUTH_URL = pd( "http://librarysimplified.org/terms/problem/no-auth-url", 400, _("No Authentication URL provided"), _("You must provide a URL to a public key integration document to register a server." ), ) REMOTE_INTEGRATION_ERROR = pd( "http://librarysimplified.org/terms/problem/remote-integration-failed", 502, _("Could not retrieve document"), _("The specified URL could not be retrieved."), ) INVALID_INTEGRATION_DOCUMENT = pd( "http://librarysimplified.org/terms/problem/invalid-integration-document", 400, title=_("Invalid integration document"))
from core.util.problem_detail import ProblemDetail as pd from core.problem_details import * from flask_babel import lazy_gettext as _ NO_AUTH_URL = pd( "http://librarysimplified.org/terms/problem/no-auth-url", 400, _("No Authentication URL provided"), _("You must provide a URL to a public key integration document to register a server."), ) REMOTE_INTEGRATION_ERROR = pd( "http://librarysimplified.org/terms/problem/remote-integration-failed", 502, _("Could not retrieve document"), _("The specified URL could not be retrieved."), ) INVALID_INTEGRATION_DOCUMENT = pd( "http://librarysimplified.org/terms/problem/invalid-integration-document", 400, title=_("Invalid integration document") )
from core.util.problem_detail import ProblemDetail as pd from core.problem_details import * from flask_babel import lazy_gettext as _ REMOTE_INTEGRATION_FAILED = pd( "http://librarysimplified.org/terms/problem/remote-integration-failed", 502, _("Third-party service failed."), _("The library could not complete your request because a third-party service has failed."), ) CANNOT_GENERATE_FEED = pd( "http://librarysimplified.org/terms/problem/cannot-generate-feed", 500, _("Feed should be been pre-cached."), _("This feed should have been pre-cached. It's too expensive to generate dynamically."), ) INVALID_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/credentials-invalid", 401, _("Invalid credentials"), _("A valid library card barcode number and PIN are required."), ) EXPIRED_CREDENTIALS = pd( "http://librarysimplified.org/terms/problem/credentials-expired", 403, _("Expired credentials."), _("Your library card has expired. You need to renew it."), )