Skip to content

Commit c52d671

Browse files
dawidwolski-identtdopry
authored andcommitted
json response
1 parent a9e1e93 commit c52d671

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

oauth2_provider/views/introspect.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ def get_token_response(token_value=None):
3636
except ObjectDoesNotExist:
3737
return JsonResponse({"active": False}, status=200)
3838
except AttributeError:
39-
return HttpResponseBadRequest(
40-
{"error": "invalid_request", "error_description": "Token parameter is missing."}
39+
return JsonResponse(
40+
{"error": "invalid_request", "error_description": "Token parameter is missing."},
41+
status=400,
4142
)
4243
else:
4344
if token.is_valid():

0 commit comments

Comments
 (0)