This fixes the issue where the server was upset about sending two headers (responses) back from the backend. To solve this I moved the role checks before the try, to avoid making it into an if-else if case. Feel free to suggest the latter if you feel the role check MUST be inside the try-catch.
This fixes the issue where the server was upset about sending two headers (responses) back from the backend. To solve this I moved the role checks before the try, to avoid making it into an if-else if case. Feel free to suggest the latter if you feel the role check MUST be inside the try-catch.