Skip to main content

common.utils

custom_exception_handler

def custom_exception_handler(exc, context)

A custom header that adds is_error field to a response. This field is helpful for the web app written in typescript which can conditionally define a response body type based on this flag.

get_client_ip

def get_client_ip(request)

Retrieve client ip from x-forwarded-for header in case of load balancer usage