Skip to content

Improve error handling #51

@JohannesHome

Description

@JohannesHome

Hey, with the api v3 changes the error handling seems to have changed somehow, we are seeing lots of FigoExceptions now.

Sadly, this exception isn't helpful in some cases where the underlying ErrorObject of the api returns meaningful information that is not propagated.

Problems:

FigoException

  • missing exception message
    • often there is only a description and no message, which means the Exception.message is null (maybe have a fall back to the description?)
  • missing error code
    • handling is difficult as the error_code is often part of the message (404 = 1002 etc)
  • missing data
    • in case of schema errors there is no way to tell what is wrong based on the description

Most of these problems could be solved simply by returning the ErrorObject, and adding data to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions