Skip to content

Management API GET ProductCatalogGroupsSortList returns 500: serialization of System.Type is not supported ($.Model.SaveCommandType) #699

Description

@Justinvolved

Describe the bug

The Management API query ProductCatalogGroupsSortList always fails with HTTP 500, because its model exposes a SaveCommandType property of type System.Type, which System.Text.Json refuses to serialize. The sort order of the top-level groups in a shop therefore cannot be read over the API, while the matching save command works. A tool that reorders groups has to write the order blind.

To Reproduce

  1. GET /Admin/Api/ProductCatalogGroupsSortList?ShopId=SHOP1 with a valid API key.

Observed (DW 10.28.11):

HTTP 500
{"type":"https://tools.ietf.org/html/rfc9110#section-15.6.1",
 "title":"Serialization and deserialization of 'System.Type' instances is not supported. Path: $.Model.SaveCommandType.",
 "status":500}

Also seen on 10.28.10.

Expected behavior

HTTP 200 with the sorted list of groups for the shop. SaveCommandType is marked [JsonIgnore] (or exposed as a type name string) so the model serializes.

Environment

  • Dynamicweb 10.28.11 (.NET 10 hosting)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingProductsFor items related to Products

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions