Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

500 InternalServerError when using expand parameter without value

Found in

EPiServer.ContentDeliveryApi 1.0.1

Fixed in

EPiServer.ContentDeliveryApi 2.1.0

(Or a related package)

Created

Jul 02, 2018

Updated

Oct 30, 2018

State

Closed, Fixed and tested


Description

Note: You get same error when using expand=& (EPCMSHost/api/episerver/v1.0/content/147?expand=&)

Precondition

  • a published page

Steps to reproduce

  1. Get content by ID with expand but without a value for the expand parameter:

{{EPCMSHost}}/api/episerver/v1.0/content/147?expand=

Expected
400 - Bad Request with proper error message should be returned.

Actual
Get 500 InternalServerError
"error":

{ "code": "InternalServerError", "message": "Exception has been thrown by the target of an invocation." }