Skip to content

Clear error massages about "project" input #15

@yanirmr

Description

@yanirmr

Hi,

Thank you again for this useful package.

I have a small suggestion about error messages.

In some methods, there is a "project" parameter that supports project objects or project identifiers. It is not clear why I am trying to send and receive data by project name, but I am unable to do so. Unfortunately, this feature is not supported.

It may not be a smart idea at all to obtain data by project name. However, the current error message is not clear enough and it may be beneficial to convert it.

When I run this code:

pycaprio_client = Pycaprio("some-url", ('user', 'pass'))
zip_content = pycaprio_client.api.export_project("project-name", InceptionFormat.UIMA_CAS_XMI)

This is the error:

pycaprio.core.exceptions.InceptionBadResponse: HTTP 500: {"messages":[{"level":"ERROR","message":"Internal server error: Failed to convert value of type 'java.lang.String' to required type 'long'; nested exception is java.lang.NumberFormatException: For input string: \"project-name\""}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions