phusion / frontapp Goto Github PK
View Code? Open in Web Editor NEWRuby client to work with Frontapp API
License: MIT License
Ruby client to work with Frontapp API
License: MIT License
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.
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.
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!
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!
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.