+
+def send_error_code(args):
+ if 'code' in args.keys():
+ code = args['code']
+ if code == '405':
+ return(set_error(None, "Method not allowed", 405, "Method not allowed for the URI", None, None, None, None))
+ elif code == '429':
+ return(set_error(None, "Too many requests", 429, "Too many requests have been sent in a given amount of time", None, None, None, None))
+ elif code == '507':
+ return(set_error(None, "Insufficient storage", 507, "The method could not be performed on the resource because the provider is unable to store the representation needed to successfully complete the request", None, None, None, None))
+ elif code == '503':
+ return(set_error(None, "Service unavailable", 503, "The provider is currently unable to handle the request due to a temporary overload", None, None, None, None))
+ else:
+ return(set_error(None, "Not found", 400, "No resource found at the URI", None, None, None, None))
+ else:
+ return(set_error(None, "Not found", 400, "No resource found at the URI", None, None, None, None))