Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Return error instead of printing err #58

Copy link
Copy link
@lebsack-conquer

Description

@lebsack-conquer
Issue body actions

Right now, the simpleforce lib generally logs errors to stdout.

        if err != nil {
		log.Println(logPrefix, "json decode failed,", err)
		return nil
	}

There are a few issues with this

  1. The client does not have visibility to the error and therefore cannot appropriately handle a failure
  2. Many production services will have a specific log format which this likely won't follow (ex. JSON logs to be picked up by a parser to ship to an ELK stack) If the log line doesn't follow the format, they will be ignored and the failure will be invisible

I'd like to propose a change to have errors returned the the client so that the client and properly handle failures and log appropriately. ex:

        if err != nil {
		return JsonDecodeErr
	}
Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.