Inconsistent API response for passing strings exceeding 255 characters

I’m working on error handling and want to be sure I’m covering some bases to provide more suitable user-facing error messaging. In doing so, I’ve noticed what appears to be some inconsistency in how the API responds to mutations on text inputs.

Namely, I’ve compared three mutations:

  • create_workspace
  • create_board
  • create_item

Sample input (length: 256): abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv

  1. Create a workspace

The workspace is created given the sample input with no error response (200 nor non-200). However, the workspace’s name is silently truncated to 255 characters.

  1. Create a board

The board is unable to be created, throwing a CreateBoardException (400).

  "error_code": "CreateBoardException",
  "status_code": 400,
  "error_message": "Failed to create board",
  "error_data": {}
  1. Create an item

The item is unable to be created, throwing an ItemNameTooLongException (200).

  "error_code": "ItemNameTooLongException",
  "status_code": 200,
  "error_message": "item_name is too long. Item names must be below 256 characters.",
  "error_data": {
    "item_name": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuv"

So, my questions are:

  1. Shouldn’t workspace creation throw an exception? While the workspace was indeed created, it was not created with the query specified.
  2. Creating a board and creating an item both failed for the same reason: the name exceeded 255 characters. So, why the different status codes?

Hello @riosd!

I hear what you say about different status codes for an issue that originates from the same source. I will pass this feedback to our team so that they can review the error codes and messages.

I will also share your experience with the creation of the workspace and the issue of not getting an exception.

All feedback is very useful for us so thank you very much :slightly_smiling_face:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.