Coder Social home page Coder Social logo

frontapp's People

Contributors

feolea avatar floord avatar jcrate avatar jefferal1995-lending-home avatar langsharpe avatar scarhand avatar tatey avatar techpeace avatar thechrisoshow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frontapp's Issues

Receive Message Error Handling + 502 Consistency

I know this is probably a product of the API as 502 probably means something flapping at the ingress but regardless the library spits out a weird exception as there is no error handling on status codes (Or there is and it assumes JSON) and it tries to decode an HTML response as JSON.

Version: 0.0.11
Rails: 6.1.7.3
Ruby: 2.7.7

Error Snippet:

[809: unexpected token at '<html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> </body> </html> '](REDACTED?queue=failed#)

Stack Trace

/usr/local/bundle/gems/json-2.5.1/lib/json/common.rb:216:in `parse'
/usr/local/bundle/gems/json-2.5.1/lib/json/common.rb:216:in `parse'
/usr/local/bundle/gems/frontapp-0.0.11/lib/frontapp/client.rb:103:in `create'
/usr/local/bundle/gems/frontapp-0.0.11/lib/frontapp/client/messages.rb:126:in `receive_custom_message

Request:

FrontClient.client.receive_custom_message(channel, {
                                                  sender:
                                                    {
                                                      name: 'REDACTED',
                                                      handle: 'REDACTED'
                                                    },
                                                  subject: 'REDACTED,
                                                  body: 'REDACTED
                                                })

I can go ahead and wrap a standard error around this but I figure I throw it your way for visibility on 502 and the potential for status unwrapping in code.

Delete Contact Handle isn't working

Whenever I try to use the delete_contact_handle! method, I get an error saying the handle can't be found for the specified contact, even though the handle is clearly assigned to that contact.

README should specify "author_id" takes the id not email address

Hi! Thanks for building this!

I just started using it, and wanted to flag that in the README author_id is given as an email address, but it appears โ€” through use โ€” that the value should be the teammate ID from the Front API, rather than the email address of that teammate.

Thus the example of:

comment = client.create_comment!("cnv_55c8c149", { author_id: "[email protected]", body: "text" })

should actually be something like

comment = client.create_comment!("cnv_55c8c149", { author_id: "trd_rfjh", body: "text" })

I'm new to Front's API so opening this issue rather than immediately jumping to a PR in case there's a foible I'm not familiar with here.

Thanks again!

Empty body for attachments

When using the download_attachment method for an image, the response body does not contain the image content.

When I drop down and use HTTP directly, the response.ready_body invocation returns the binary data correctly but it doesn't seem to make it up into the frontapp gem's response.

Filtering Contacts?

Hey there!

Love what you have created.

Question: Is there a way to filter contacts? E.g. I want to find all contacts NOT in a group, or where a specific field is empty.

Cheers!

How to track errors?

Hey,

First off thanks for the library.

A question accoured, how can i track errors from the API? For example Unauhtorized error(so i can track whenever my token is correct/valid). I see it in object, but it's really not that accessable.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.