apiKey Value cannot be null

Getting this error using the typescript client to a pretty vanilla aspnet (azure webapp) server:

{“responseStatus”:{“errorCode”:“ArgumentNullException”,“message”:“Value cannot be null. (Parameter ‘apiKey’)”,“errors”:[{“errorCode”:“ArgumentNullException”,“fieldName”:“apiKey”,“message”:“Value cannot be null.”}]}}

This client is authenticated using bearer/refresh tokens and other calls in the same environment work just fine…

  1. Request URL:

https://weqtest1.azurewebsites.net/json/reply/BidSubmission

  1. Request Method:

POST

  1. Status Code:

400 ArgumentNullException

  1. Remote Address:

20.118.138.133:443

  1. Referrer Policy:

strict-origin-when-cross-origin

  1. Response HeadersView source

  2. Access-Control-Allow-Credentials:

true

  1. Access-Control-Allow-Headers:

Content-Type, Allow, Authorization, X-Args

  1. Access-Control-Allow-Methods:

GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD

  1. Access-Control-Max-Age:

600

  1. Content-Type:

application/json; charset=utf-8

  1. Date:

Fri, 02 Dec 2022 00:48:55 GMT

  1. Request-Context:

appId=cid-v1:fcb075b6-733a-4c53-ad4a-5f971bfeac9e

  1. Server:

Kestrel

  1. Strict-Transport-Security:

max-age=2592000

  1. Transfer-Encoding:

chunked

  1. Vary:

Accept

  1. X-Powered-By:

ServiceStack/6.40 NET6/Linux/net6/NO

  1. Request HeadersView source

  2. Accept:

3./*

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

en-GB,en-US;q=0.9,en;q=0.8

  1. authorization:

Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6MjMyfQ.xxxxx.LSUlkybkgFITI65OIVeJHk3US8JLyYB6vt0CmEo_OIU

  1. Connection:

keep-alive

  1. Content-Length:

464

  1. content-type:

application/json

  1. Cookie:

ss-opt=perm; ss-id=x; ss-pid=x; X-UAId=4

  1. Host:

x.azurewebsites.net

  1. Origin:

https://x.azurewebsites.net

  1. Referer:

https://x.azurewebsites.net/FormA

  1. sec-ch-ua:

“Not?A_Brand”;v=“8”, “Chromium”;v=“108”, “Google Chrome”;v=“108”

  1. sec-ch-ua-mobile:

?0

  1. sec-ch-ua-platform:

“Windows”

  1. Sec-Fetch-Dest:

empty

  1. Sec-Fetch-Mode:

cors

  1. Sec-Fetch-Site:

same-origin

  1. User-Agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Hi @kev_rm,

Are you able to share the stacktrace of the error from your logs? Can’t tell from the reuqest/response where the source of the ArgumentNullException might be originating. Thanks

Ah this was infact getting thrown from the service… my bad… just didn’t have the proper logging setup

1 Like