"""Interface to the ows-users microservice.""" from owsrequest import request from owsresponse import status from product_review.constants import error, services from product_review.util import exception as exception_util def get_orchadmin_user(user_id): """Get orchadmin_user data.""" ows_response = request.get(services.OWS_USERS, f"/users/{user_id}") if ows_response.status_code == status.OK: return ows_response.json() exception_util.raise_exception_for_ows_response( status=ows_response.status_code, code=error.OWS_USERS_ERROR_CODE, message=ows_response.text, )