Skip to content

Nulls in object submitted to /api/statuses cause 400 #177

@aliceif

Description

@aliceif

At some point either Nightfox-Dawn when sending a post to the server started to populate unset fields like poll with null or Hollo started rejecting requests with those fields set to null
example request body:
{"language":"en","status":"Awoo!","in_reply_to_id":null,"sensitive":false,"spoiler_text":null,"media_ids":null,"visibility":"public","poll":null}
example response body:

{"success":false,"error":{"issues":[{"code":"invalid_type","expected":"array","received":"null","path":["media_ids"],"message":"Expected array, received null"},{"code":"invalid_type","expected":"object","received":"null","path":["poll"],"message":"Expected object, received null"},{"code":"invalid_type","expected":"string","received":"null","path":["spoiler_text"],"message":"Expected string, received null"},{"code":"custom","message":"expected a UUID","fatal":true,"path":["in_reply_to_id"]}],"name":"ZodError"}}

Is this something that could be relaxed on Hollo's side? Mastodon accepts these nulls just fine ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions