@@ -23,7 +23,7 @@ def wrapper(*args, **kwargs):
23
23
request .headers ['Content-Type' ] != 'application/vnd.api+json' :
24
24
error = jsonify (jsonapi_errors ([{'source' : '' ,
25
25
'detail' : "Content-Type header must be application/vnd.api+json" ,
26
- 'title' : 'InvalidRequestHeader ' ,
26
+ 'title' : 'Invalid request header ' ,
27
27
'status' : '415' }]))
28
28
return make_response (error , 415 , {'Content-Type' : 'application/vnd.api+json' })
29
29
if 'Accept' in request .headers :
@@ -36,8 +36,9 @@ def wrapper(*args, **kwargs):
36
36
flag = True
37
37
if flag is True :
38
38
error = jsonify (jsonapi_errors ([{'source' : '' ,
39
- 'detail' : "Accept header must be application/vnd.api+json" ,
40
- 'title' : 'InvalidRequestHeader' ,
39
+ 'detail' : ('Accept header must be application/vnd.api+json without'
40
+ 'media type parameters' ),
41
+ 'title' : 'Invalid request header' ,
41
42
'status' : '406' }]))
42
43
return make_response (error , 406 , {'Content-Type' : 'application/vnd.api+json' })
43
44
return func (* args , ** kwargs )
0 commit comments