conversation.bigbinary.com
Return 404 when record is not found · Conversation With API Builders — BigBinary eBook
http://conversation.bigbinary.com/chapter/return-404-when-user-is-not-found.html
BigBinary Conversation With API Builders. Return 404 when record is not found. When a record is not found then error message should be clear about what record is not found. And use status code 404 to indicate that record was not found. I am used to writing code like. Current user.cars.find params[:car id]. It raises an exception when record is not found. This is what I have right now. In the above code the issue is that if there is no car matching. Then above code would raise.
conversation.bigbinary.com
Return 422 when the input data is not valid · Conversation With API Builders — BigBinary eBook
http://conversation.bigbinary.com/return-422-when-input-data-is-not-valid.html
BigBinary Conversation With API Builders. Return 422 when the input data is not valid. 422 should be used when the data is syntactically correct but semantically incorrect. You sure love fancy words. Last time you talked about data being syntactically correct. And now you are talking about semantically incorrect. Why can’t you speak simple english. Ldquo;Semantically” simpley means business wise. So in other words the payload is “syntacticaly correct” but “semantically incorrect”.
conversation.bigbinary.com
Return 200 when it is all good · Conversation With API Builders — BigBinary eBook
http://conversation.bigbinary.com/return-200-when-it-is-all-good.html
BigBinary Conversation With API Builders. Return 200 when it is all good. Hey, I have a problem. I sent a request to the API to create a user. But I do not see the newly created user. The email address that you sent is already taken. Hmmmbut I got 200 as the response status code. Forget about the response code. You need to check the payload. I sent the error message as “error” key. If the system could not create the user then why did it return 200 as response status.
conversation.bigbinary.com
Do not use redirect in API · Conversation With API Builders — BigBinary eBook
http://conversation.bigbinary.com/do-not-use-redirect-in-api.html
BigBinary Conversation With API Builders. Do not use redirect in API. Do not do this def destroy . @user.destroy redirect to :back end. In the above case. Does not mean anything when you are dealing with API. The correct version would be. Def destroy . @car alert.destroy render head: :no content, status: :ok end.
conversation.bigbinary.com
Return 500 when an error is encountered · Conversation With API Builders — BigBinary eBook
http://conversation.bigbinary.com/return-500-when-erro-is-encountered.html
BigBinary Conversation With API Builders. Return 500 when an error is encountered. Hi there. Long time no see. Yes I was busy. The API code is in production now. I noticed. I got error message that something went wrong. Yes I’m working on it. If something goes wrong then you should send response code 500. It means that something unexpected happened. Like an exception was raised or database could not be connected.
blog.bigbinary.com
How to obtain current time from a different timezone in Selenium IDE using javascript | BigBinary Blog
http://blog.bigbinary.com/2015/01/08/how-to-obtain-current-time-from-a-different-timezone-in-selenium-ide-using-javascript.html
How to obtain current time from a different timezone in Selenium IDE using javascript. January 08, 2015 - Prabhakar Battula. I had encountered a problem in one of our projects where it was required to obtain the current time from a different timezone and then use it. I am in IST (Indian Standard Timezone - 5.50) and was required to get the time in EST (Eastern Standard Timezone 5.00). These are the set of commands I used to achieve that. Command is used to store the value in the variable. Is in minutes;.
blog.bigbinary.com
Verifying PubSub Services from Rails using Redis | BigBinary Blog
http://blog.bigbinary.com/2015/05/09/verifying-pubsub-services-from-rails-redis.html
Verifying PubSub Services from Rails using Redis. May 09, 2015 - Vipul. Let’s say that we have a Service that reads and writes to Redis. We have. For managing connection,. To write to Redis and. To read from Redis. Base class to manage connection. Class to write to Redis. Class to read from Redis. A test for the above mentioned case might look like this. Test writing and reading value using redis. To messages sent to Redis. Problem is that Redis. And allow our tests to go ahead and verify some scenario.
blog.bigbinary.com
Blue border around JWPLAYER video | BigBinary Blog
http://blog.bigbinary.com/2015/02/21/blue-border-around-jwplayer-video.html
Blue border around JWPLAYER video. February 21, 2015 - Prathamesh Sonpatki. Latest versions of JWPlayer(6.9 onwards) adds blue border around the video when it is in focus. This is because of the CSS class. The blue border around currently selected video allows to identify which instance of JWPlayer is in focus. But with a single JWPlayer instance, it can be annoying. To remove this blue border, we can override the default JWPlayer CSS as follows. On February 21, 2015. Subscribe to our monthly newsletter.
SOCIAL ENGAGEMENT