Skip to content

Crashes in QueryParser #210

Closed
Closed
@shuebner

Description

@shuebner

There are some errors in the QueryParser that make it throw unexpected exceptions:

  1. ParseFieldsQuery throws NullReferenceException when the field in the query doesn't exist, because of unchecked SingleOrDefault() (same thing in ContextGraph.GetRelationshipName btw)

  2. Page query parsing crashes with some malformed queries, e. g. ParsePageQuery will crash when querying with ?page[size]=a. This should probably be a TryParse instead of a ToInt32

I can prepare a PR if you want.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions